Open
Description
Bug Report
Q | A |
---|---|
Version | 3.3.2 |
Summary
With the following mapping:
#[ORM\Table(schema: 'my')]
class User
whenever I rerun bin/console make:migration
, I'm getting:
$this->addSql('CREATE TABLE my."user" (...)');
$this->addSql('DROP TABLE my."user"');
This is apparently due to user
being a reserved word in SQL (or PostgreSQL), and the escaping Doctrine applies (as discussed in various issues at DBAL).
When I remove the schema, it works as expected:
[WARNING] No database changes were detected.
Workaround:
Rename the table in the database:
#[ORM\Table(name: 'users', schema: 'my')]
Current behavior
Expected behavior
How to reproduce
Metadata
Metadata
Assignees
Labels
No labels