You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run "doctrine:migrations:refresh", the following error occurs:
Doctrine\DBAL\Exception\SyntaxErrorException : An exception occurred while executing 'DROP TABLE order':
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order' at line 1
The problem occurs when trying to drop a table which has some of the reserved MySQL keywords like ORDER.
When you look at src/Console/ResetCommand.php, line 91:
$schema->dropTable($table);
The problem is solved if you put quotes ` between $table variable:
Is there any other solution to the problem or a possible fix?
The text was updated successfully, but these errors were encountered:
fsasvari
changed the title
migrations:refresh does not work on reserved MySQL keywords
doctrine:migrations:refresh command does not work on reserved MySQL keywords
Sep 3, 2019
When I try to run "doctrine:migrations:refresh", the following error occurs:
The problem occurs when trying to drop a table which has some of the reserved MySQL keywords like ORDER.
When you look at
src/Console/ResetCommand.php
, line 91:$schema->dropTable($table);
The problem is solved if you put quotes ` between $table variable:
https://i.imgur.com/r9E8yz0.png
Is there any other solution to the problem or a possible fix?
The text was updated successfully, but these errors were encountered: