-
-
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
Include enum changes in doctrine migration #135
Comments
Thanks a lot for this hint, however it only works for MySQL. In postgres and mssql, this check is realized in a different way: there is a named check or constraint (c.f. |
At the database level, all constraints are stored in the context of a table, not a specific field.
In the results, you can see the real name of the constraint for your column.
Also, don't forget to implement down method for new migration.
|
To drop comments use this command |
@fre5h, thank you very much for your work! And this command:) |
On which version doctrine:enum:drop-comment is avalaible ? Thanks |
@tguenneguez It is available since bundle version 7.3.0 https://github.com/fre5h/DoctrineEnumBundle/releases/tag/v7.3.0 |
Hi!
Suppose I add or remove an option from my enum.
When creating a doctrine migration, this change is not included in the migration. Do I have to do this manually?
Example:
before
after:
The automatically created migration by
doctrine:migrations:diff
does not care about this change.What would be necessary is to first drop each CHECK-constraint, and then recreate it with the new set of enum values:
for postgres:
for MS SQL Server:
However, I would additionally have to find all usages of the enum in my entities manually.
I think automating this would be great !?
The text was updated successfully, but these errors were encountered: