From de529fb81cc80cd49666a80ef60de6015ff81c1c Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 23 Mar 2011 17:38:54 -0400 Subject: - adjust the previous checkin a bit. need to transfer sequences over from pickle even if they are *not* restated. its necessary here to do a "replacement" scheme when an incoming sequence replaces the previous. Theoretically we could do what Table does here, i.e. use a singleton constructor, but this is heavyhanded. The most recent sequence placed in is the winner is likely the most expected behavior. --- lib/sqlalchemy/engine/ddl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine/ddl.py') diff --git a/lib/sqlalchemy/engine/ddl.py b/lib/sqlalchemy/engine/ddl.py index dca183f9a..79958baae 100644 --- a/lib/sqlalchemy/engine/ddl.py +++ b/lib/sqlalchemy/engine/ddl.py @@ -51,7 +51,7 @@ class SchemaGenerator(DDLBase): tables = metadata.tables.values() collection = [t for t in sql_util.sort_tables(tables) if self._can_create_table(t)] - seq_coll = [s for s in metadata._sequences + seq_coll = [s for s in metadata._sequences.values() if s.column is None and self._can_create_sequence(s)] metadata.dispatch.before_create(metadata, self.connection, @@ -112,7 +112,7 @@ class SchemaDropper(DDLBase): tables = metadata.tables.values() collection = [t for t in reversed(sql_util.sort_tables(tables)) if self._can_drop_table(t)] - seq_coll = [s for s in metadata._sequences + seq_coll = [s for s in metadata._sequences.values() if s.column is None and self._can_drop_sequence(s)] metadata.dispatch.before_drop(metadata, self.connection, -- cgit v1.2.1