SQL Error while running migration script
Created by: Joshua265
Describe the bug while running the migration script the following error occurs. Even after running the migration script, the partdb frontend responds with an error 500.
To Reproduce Steps to reproduce the behavior:
- build and run docker image
- connect it to mariadb docker container as database
- have data of previous partdb in mariadb
- sudo docker exec -it partdb sh
- php bin/console doctrine:migrations:migrate
Expected behavior script runs without errors
console output
[notice] Migrating up to DoctrineMigrations\Version20200502161750 [error] Migration DoctrineMigrations\Version20200126191823 failed during Execution. Error: "An exception occurred while executing 'DROP INDEX id_user ON log': SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists" 16:25:15 CRITICAL [console] Error thrown while running command "doctrine:migrations:migrate". Message: "An exception occurred while executing 'DROP INDEX id_user ON log':\n\nSQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists" ["exception" => Doctrine\DBAL\Exception\DriverException^ { …},"command" => "doctrine:migrations:migrate","message" => """ An exception occurred while executing 'DROP INDEX id_user ON log':\n \n SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists """] In AbstractMySQLDriver.php line 128: An exception occurred while executing 'DROP INDEX id_user ON log': SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists In Exception.php line 18: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists In PDOConnection.php line 141: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX id_user
; check that it exists 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] [- []
Server Side
- Part-DB Version: https://github.com/Part-DB/Part-DB-symfony/commit/e942ab1bf6e6de0c216862b2b4b58f1375a27ca8
- PHP Version: PHP 7.4.27 (cli) (built: Dec 21 2021 21:31:45) ( NTS )
- Database Server: latest mariadb docker image