diff options
Diffstat (limited to 'test/dialect/postgresql/test_reflection.py')
-rw-r--r-- | test/dialect/postgresql/test_reflection.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_reflection.py b/test/dialect/postgresql/test_reflection.py index 84aeef130..5f9e6df9a 100644 --- a/test/dialect/postgresql/test_reflection.py +++ b/test/dialect/postgresql/test_reflection.py @@ -344,6 +344,22 @@ class ReflectionTest(fixtures.TestBase): eq_(r.inserted_primary_key, [2]) @testing.provide_metadata + def test_altered_type_autoincrement_pk_reflection(self): + metadata = self.metadata + t = Table( + 't', metadata, + Column('id', Integer, primary_key=True), + Column('x', Integer) + ) + metadata.create_all() + testing.db.connect().execution_options(autocommit=True).\ + execute('alter table t alter column id type varchar(50)') + m2 = MetaData(testing.db) + t2 = Table('t', m2, autoload=True) + eq_(t2.c.id.autoincrement, False) + eq_(t2.c.x.autoincrement, False) + + @testing.provide_metadata def test_renamed_pk_reflection(self): metadata = self.metadata t = Table('t', metadata, Column('id', Integer, primary_key=True)) |