[sqlalchemy] Re: update sequence on insert

2008-02-16 Thread Brett
I have to be able to dump my tables to CSV so I need to keep the primary key values so my foreign keys match up. Michael Bayer wrote: On Feb 15, 2008, at 5:53 PM, Brett wrote: serial column instead. On sqlite the id column seems to always generate a unique number. I'm not sure what

[sqlalchemy] Re: update sequence on insert

2008-02-16 Thread Michael Bayer
On Feb 16, 2008, at 8:31 PM, Brett wrote: I have to be able to dump my tables to CSV so I need to keep the primary key values so my foreign keys match up. Michael Bayer wrote: On Feb 15, 2008, at 5:53 PM, Brett wrote: serial column instead. On sqlite the id column seems to always

[sqlalchemy] Re: update sequence on insert

2008-02-15 Thread Michael Bayer
On Feb 15, 2008, at 5:53 PM, Brett wrote: serial column instead. On sqlite the id column seems to always generate a unique number. I'm not sure what other databases do. What's the best way to address this? Here's an example of whats happening: why not rely upon the sequence