]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
- Added a routine by which the Postgresql Alembic dialect inspects
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Sep 2014 21:00:21 +0000 (17:00 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 20 Sep 2014 21:23:00 +0000 (17:23 -0400)
commitff74edfc7e1dab3f6e19c546eb956fbd0bae30d8
tree4e5de78a5c3c7ea94a6b11c70cb10826d0405645
parent75652fe132913aea255e55d89b29c393283cdd06
- Added a routine by which the Postgresql Alembic dialect inspects
the server default of INTEGER/BIGINT columns as they are reflected
during autogenerate for the pattern ``nextval(<name>...)`` containing
a potential sequence name, then queries ``pg_catalog`` to see if this
sequence is "owned" by the column being reflected; if so, it assumes
this is a SERIAL or BIGSERIAL column and the server default is
omitted from the column reflection as well as any kind of
server_default comparison or rendering, along with an INFO message
in the logs indicating this has taken place. This allows SERIAL/BIGSERIAL
columns to keep the SEQUENCE from being unnecessarily present within
the autogenerate operation.
fixes #73
alembic/autogenerate/compare.py
alembic/ddl/impl.py
alembic/ddl/postgresql.py
alembic/testing/__init__.py
docs/build/changelog.rst
tests/test_postgresql.py