-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Generated migrations do not consider columnDefinition=...
clause
#6519
Comments
From the documentation you linked:
If the ORM's schema tool cannot detect the changes, why do you expect that to work when using
Sorry, where exactly does it say that? |
@greg0ire is the SchemaTool limitation a hard limitation, or just it's a nice feature and nobody bothered to implement it yet ? by that I mean, is doing a PR a lost cause (because not possible with the dbal architecture) or is it feasible ? (in that case I may give it a try) |
I think it has been a lost cause in the past, but now that we have platform-aware comparison, it might be thinkable. Also, I don't think the limitation will have to do with @derrabus I wonder if it could be done through the |
I think it's worth giving it a try. The current implementation compares SQL to SQL and (as previously) ignores the custom declaration: dbal/src/Platforms/AbstractPlatform.php Lines 2221 to 2230 in 0f0398a
If instead of unsetting However, I think the problem is that the custom SQL provided by the user will unlikely ever match the SQL generated by the DBAL (because otherwise, why would they provide it to begin with?), and this will cause infinite schema mismatch. |
@greg0ire OK, mistake from me then, I misunderstood this. I though the content of the Thanks for considering a potential implementation anyway. |
doctrine/doctrine-migrations-bundle 3.3.1
octrine/dbal 3.9.1
The content of
columnDefinition=...
is not part of the generated migration.For instance:
When using the
doctrine:migrations:diff
ordoctrine:migrations:migrate
, the generated migration does not contain the custom column definition. According to the documentation here, this custom setting should be set in the migration.The text was updated successfully, but these errors were encountered: