mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-2560: Schema tool invalid DDL syntax for default values #3215
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jul 19, 2013).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user ben.davies:
Not sure if this is Postgresql specific or not, but here are the reproduction steps:
Have a table with a column setup like so:
Have a Entity Column Definition like so:
orm:schema-tool:update will generate the following SQL:
adding
to the column definition results in no sql being generated (correctly I assume)
@doctrinebot commented on GitHub (Jul 19, 2013):
Comment created by @ocramius:
The ORM doesn't support default column values.
That's fine-tuning you can do on the column definitions.
Your "workaround" is actually the correct way of dealing with this kind of DDL change.
@doctrinebot commented on GitHub (Jul 19, 2013):
Comment created by ben.davies:
I realise the ORM doesn't support default values, but the point is that the schematool picks up a diff in the columns, tries to generate a diff, and generates an invalid sql statement. Surely that is a bug?
@doctrinebot commented on GitHub (Jul 19, 2013):
Comment created by @ocramius:
[~ben.davies] the DBAL is responsible for generating this wrong DDL... Are you able to reproduce this in DBAL only?
@doctrinebot commented on GitHub (Jul 19, 2013):
Comment created by ben.davies:
Happy to try.
@doctrinebot commented on GitHub (Jul 19, 2013):
Comment created by ben.davies:
here you go
https://github.com/bendavies/dbal/blob/DBAL-561/tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL561Test.php