I added some DB tables in my Symfony2 project. Then, I used the following command:
php app/console doctrine:generate:entities Acme
to update the classes. Then, I tried to update the MySQL DB by using the following command:
php app/console doctrine:schema:update --force
However, I get the following error message
[PDOException]
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
'like TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, INDEX IDX_8EA4B675A76ED3' at line 1
How can I see which SQL query is wrong? Where the auto generate SQL queries are put?
Thanks in advance.
Run php app/console doctrine:schema:update --dump-sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With