autogenerate wrongly determined a primary key integer column to autoincrement #94
Migrated issue, originally created by Eric Hui (@ehui)
Hi, I use pyramid, added the following table in my models init.py file
ran --autogenerate and got following upgrade
when I checked it out in "offline" mode (upgrade head --sql), got the following
I would like to be able to have the option to not AUTO_INCREMENT....
I was able to temporarily get around using the following in upgrade
works well except the default is 0 instead of NULL, am I misunderstanding something with server_default?
The text was updated successfully, but these errors were encountered:
Michael Bayer (@zzzeek) wrote:
just the "autoincrement=False" directive is enough for it to not say "AUTO_INCREMENT". Ideally, you'd want to put this in the "platform" Column definition inside the "pageview_table" Table you created in your pyramid app. There's a bug which I have just fixed in 97b7227 that would prevent this from being propagated to the migrate script. If you want to stay on 0.4.0, then add "autoincrement=False" to the column definition into your updgrade() script manually.