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
Encountered within a Symfony 5.4 project using a PostgreSQL 12.x database, with a field named row.
Q
A
BC Break
no
Version
2.14.1
Summary
Current behavior
How to reproduce
Create or update an entity with a row attribute.
I didn't take the time to try with other reserved SQL words.
Make a new migration, the generated code is like this:
publicfunctionup(Schema$schema): void
{
// this up() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE configuration ALTER "row" DROP NOT NULL');
}
publicfunctiondown(Schema$schema): void
{
// this down() migration is auto-generated, please modify it to your needs$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE configuration ALTER row SET NOT NULL');
}
Expected behavior
The ALTER TABLE line in down() method should enclose row in double quotes, as it's done in up() one:
$this->addSql('ALTER TABLE configuration ALTER "row" SET NOT NULL');
The text was updated successfully, but these errors were encountered:
php bin/composer show | grep -i dbal
doctrine/dbal 3.5.3 Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and ...
Bug Report
Encountered within a Symfony 5.4 project using a PostgreSQL 12.x database, with a field named
row
.Summary
Current behavior
How to reproduce
Create or update an entity with a
row
attribute.I didn't take the time to try with other reserved SQL words.
Make a new migration, the generated code is like this:
Expected behavior
The
ALTER TABLE
line indown()
method should encloserow
in double quotes, as it's done inup()
one:The text was updated successfully, but these errors were encountered: