Reputation: 73
Using Symfony 5 I had some problems with an entity so deleted it with a view to rebuilding it. I also manually deleted the database table. When I now try to remake the entity using php bin/console make:entity and then php bin/console make:migration it is trying to perform and alter to the table, implying that it is expecting the table to still exist.
When I run php bin/console doctrine:schema:validate it gives:
[OK] The mapping files are correct.
[ERROR] The database schema is not in sync with the current mapping file.
How can I update the schema to reflect the fact that the table has been manually deleted?
Many thanks in advance for the help.
Upvotes: 0
Views: 694
Reputation: 350
Well if you want to do this the hard way, just try
php bin/console doctrine:schema:update --complete
--complete will sync the db with the current schema
Upvotes: 1