Re: [SQLObject] dropTable and Sequences
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-07-04 18:56:32
|
On Thu, 2003-07-03 at 14:06, Brad Bollenbach wrote: > Hi all, > > dropTable() does not drop the associated sequence. > > I would like to submit a patch for this (with unit tests, of course :), > but should dropTable drop sequences as well, or should there be a > dropSequence() method which must be called explicitly? > > Given that createTable implicitly creates sequences, this might suggest > that dropTable should implicitly drop them. Well, createTable and dropTable already have dropJoinTables/createJoinTables keyword arguments. So one could add dropSequences/createSequences to those (default True). Or maybe the whole thing should be turned into dropDependent/createDependent Of course, right now only Postgres uses sequences, and for the most part that's implicit as well -- SERIAL creates a sequence, but we don't see it directly. But, I would also presume that other databases that use sequences will be added eventually. Ian |