-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug on migration occurred after updating a field with an enum for type PostgreSQL 9.4 #31
Comments
OK. I'll check it later. Thanks |
this happened to me the other day with Symfony 3 and Postgres 9.4 as well. it also was an alter table statement |
I have the same problem, any news? |
they way I fixed this for myself was to delete the existing table then reconstruct the whole thing. Fortunately for me, I was in the position where I was able to do this |
If you want to keep your existing data, you can rewrite the migration to:
|
@timbordemann thanks, but now throw this exception when
any suggestions? |
Solved \o/ # Doctrine Configuration
doctrine:
dbal:
#...
mapping_types:
custom_type: string # <======= |
@fre5h , seems like that is a bug cause comment does not solve issue. Also experienced:
Only adding
as of above solved issue. |
@SCIF In the first code snippet you wrote This SQL So if you create a table first time and it has enum field then SQL statement for PostgreSQL is generated by this code if ($platform instanceof PostgreSqlPlatform || $platform instanceof SQLServerPlatform) {
return sprintf('VARCHAR(255) CHECK(%s IN (%s))', $fieldDeclaration['name'], $values);
} Bundle cannot at first create this |
this error still occurs for symfony 6.1 / postgres 14.2.
|
Hi, I use this bundle and I think I found a bug
I use symfony 2.7 with DoctrineEnumBundle.
When modifying an existing field in a table to add an enum type, migration that is produced for PostgreSQL 9.4 is invalid.
Migration obtained looks like this:
But this SQL statement is invalid, it returns the following error after starting the migration
I think this is a bug.
Thank you.
The text was updated successfully, but these errors were encountered: