0

i have a probleme with migrations when i add '--env=test'; the 'd:m:m' command work without 'env=test' ....

I create the test database using "symfony console d:d:c --env=test" all work the database is created, after i do 'symfony console d:m:m -n --env=test' and i got the following message :


[notice] Migrating up to DoctrineMigrations\Version20230725112526 [error] Migration DoctrineMigrations\Version20230722161417 failed during Execution. Error: "An exception occurred w hile executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tuto1_test.recettes' doesn't exist"

In ExceptionConverter.php line 49:

An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tuto
1_test.recettes' doesn't exist

In Exception.php line 28:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tuto1_test.recettes' doesn't exist

In Connection.php line 70:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'tuto1_test.recettes' doesn't exist

doctrine:migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CONFIGURATION] [--em EM] [--conn CONN] [--] []


thanks for all

  • OK that was because i deleted some migrations during the project so doctrine couldn't recreate the same database without all migrations – Veusty Veustyle Jul 27 '23 at 19:00

0 Answers0