summaryrefslogtreecommitdiff
path: root/tests/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-01-23 14:24:31 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-01-23 14:24:31 -0500
commita4302416a66253f03013528701c17f251835ef8a (patch)
tree9f128143aeff3b83828a1f8190195de4b43eccdf /tests/test_postgresql.py
parent376837484acc80a6cbc1cda9125935c05a94ee0f (diff)
downloadalembic-a4302416a66253f03013528701c17f251835ef8a.tar.gz
- add a new section "Run Multiple Alembic Environments from one .ini file",
clarify what the --name flag does and how this differs from "multiple bases". Change-Id: If65a8a11802db18bc2f42ffea360c70cbc9113bb
Diffstat (limited to 'tests/test_postgresql.py')
-rw-r--r--tests/test_postgresql.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index 21479a0..a27deeb 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -66,6 +66,12 @@ class PostgresqlOpTest(TestBase):
'ALTER TABLE t ALTER COLUMN c TYPE INTEGER USING c::integer'
)
+ def test_col_w_pk_is_serial(self):
+ context = op_fixture("postgresql")
+ op.add_column("some_table", Column('q', Integer, primary_key=True))
+ context.assert_(
+ 'ALTER TABLE some_table ADD COLUMN q SERIAL NOT NULL'
+ )
class PGOfflineEnumTest(TestBase):