Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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?
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.