When using bin/console make:entity
on Mysql and then later you switch your application to Postgres and you have a table called user
, which you most likely have when using security component of Symfony.
Then you will receive an error because user
is a reserved word in Postgres!
An exception occurred while executing 'INSERT INTO user (id, email, roles, password, is_verified) VALUES (?, ?, ?, ?, ?)' with params [3, "dev@dev.de", "[]", "your-encrypted-password", 0]:
SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "user"
LINE 1: INSERT INTO user (id, email, roles, password, is_verified) V...