-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Alter ADD Column with postgresql server_default #111
Comments
AlanB (@aboudreault) wrote: Also, with something like this: server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"), alembic generates:
<--- no sa.text. So PG fails. |
Michael Bayer (@zzzeek) wrote: this is almost a dupe of #73, but the way its sticking the hardcoded date in there seems to be an additional twist. the PG default issue is not going to be fixed easily as someone will need to write a whole parser for it. For now, consider these candidate migrations and correct the downgrades as needed. |
AlanB (@aboudreault) wrote: Thank you for you quick answer. I'm going to fix my migration files manually for now. |
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: both behaviors were fixed by #197:
|
Migrated issue, originally created by AlanB (@aboudreault)
I have a simple model:
I then changed the name of the column creation_date and run alembic --autogenerate. This is my migration downgrade section generated:
This is wrong and produce the following PG error:
The text was updated successfully, but these errors were encountered: