]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Add primary key constraint to alembic_version
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 11 Jan 2017 14:33:01 +0000 (09:33 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Jan 2017 20:49:14 +0000 (15:49 -0500)
commitb57b164177f18d09386097cacc3d425bb20c2be8
tree9e53609971499090fe15224b5d5031afa6b421e4
parent3f995ffdff22e11866d8a2e0ee0ed5ba493c296d
Add primary key constraint to alembic_version

The alembic_version table, when initially created, now establishes a
primary key constraint on the "version_num" column, to suit database
engines that don't support tables without primary keys.   This behavior
can be controlled using the parameter
:paramref:`.EnvironmentContext.configure.version_table_pk`.  Note that
this change only applies to the initial creation of the alembic_version
table; it does not impact any existing alembic_version table already
present.

Change-Id: Ic947f0f97373b2e6695e06c9b2ad6c8a9789fcb2
Fixes: #406
alembic/runtime/environment.py
alembic/runtime/migration.py
docs/build/changelog.rst
tests/test_command.py
tests/test_version_table.py