mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Empty database is not valid #6978
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vlady777 on GitHub (May 16, 2022).
Bug Report
Summary
There is a problem with doctrine:schema:validate command when database is empty (no entities and tables).
Current behavior
doctrine:schema:validate fails when no enitties and tables
$ php bin/console doc:sch:val
Mapping
[OK] The mapping files are correct.
Database
[ERROR] The database schema is not in sync with the current mapping file.
$ php bin/console doc:sch:upd --dump-sql
[OK] No Metadata Classes to process.
How to reproduce
Expected behavior
Schema should be valid.
@greg0ire commented on GitHub (May 17, 2022):
Do you get more details when you try this with maximum verbosity?
php bin/console -vvv doc:sch:upd --dump-sqlAsking because of2e4a872272/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php (L79-L87)