autogenerate, could generate invalid python code #31
Comments
Michael Bayer (@zzzeek) wrote: what happens if we use repr() there ? obviously that's a troublesome spot regardless |
Marcin Kuzminski (@marcinkuzminski) wrote: repr would generate it as server_default='"nextval('group_to_perm_group_to_perm_id_seq'::regclass)"' |
Anonymous wrote: Wouldn't triple quotes still break if the suggested value also contained three quotes in a row? in that case, repr() would always work. |
Eric Ongerth (@grault) wrote: My first attempt with 0.3.4, just today, threw this same problem too. His triple-quote fix worked, and so did repr(). First ever trial of Alembic and I'm impressed how quickly I was able to put together a working migration. Thanks. |
Michael Bayer (@zzzeek) wrote: [[https://bitbucket.org/zzzeek/alembic/changeset/fa2d266de0c9ff8616f9a332e0aa5fa545a57b15|fa2d266de0c9ff8616f9a332e0aa5fa545a57b15]] |
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Marcin Kuzminski (@marcinkuzminski)
I'm testing out autogenerate and got something like that in the proposed script:
i think it can be patched with
The text was updated successfully, but these errors were encountered: