Added support for the USING clause to the ALTER COLUMN operation
for Postgresql. Support is via the
:paramref:`.op.alter_column.postgresql_using`
parameter.
Fixes: #292
Change-Id: I8b1d418df0b6b731a68614dbffd7a9fb13de4de5
Pull-request: https://github.com/zzzeek/alembic/pull/27
This moves tests for op features specific to Postgresql.
Note this does not include tests in test_op that
make use of the postgresql backend just for "schema" support.
Change-Id: I82b4326bbc3a2c520891214c8e8254da36bd8f2a
Fixed bug where upgrading to the head of a branch which is already
present would fail, only if that head were also the dependency
of a different branch that is also upgraded, as the revision system
would see this as trying to go in the wrong direction. The check
here has been refined to distinguish between same-branch revisions
out of order vs. movement along sibling branches.
When we're about to claim an error due to
"alembic upgrade greater to lower", make sure this
isn't a request to hit a node in a different branch
that's already implied.
Change-Id: I8641162bb05c6226f0ea12b88b548df41f5a6b51
Fixes: #336
Adjusted the version traversal on downgrade
such that we can downgrade to a version that is a dependency for
a version in a different branch, *without* needing to remove that
dependent version as well. Previously, the target version would be
seen as a "merge point" for it's normal up-revision as well as the
dependency. This integrates with the changes for 🎫`377`
and 🎫`378` to improve treatment of branches with dependencies
overall.
Change-Id: Ica0732f6419f68ab85650170839ac8000ba3bbfb
Fixes: #379
Previously, a downgrade to a version that is also a dependency
to another branch, where that branch is advanced beyond
the target, would fail to be downgraded, as this would
be detected as an "umerge" even though the target version
to be INSERTed would not be present.
The patch replaces the existing heuristic
that checks for "delete" with a new one that calculates
a potential "unmerge" fully, and returns False only if we in
fact could do an unmerge.
Also change the string display of a version so that we don't
display misleading target versions that might not actually
be getting invoked.
Fixes: #377
Change-Id: I7420dd7adbd9ccf9ca85b56d9a792a85c40f3454
Fixed bug where the "alembic current" command wouldn't show a revision
as a current head if it were also a dependency of a version in a
different branch that's also applied. Extra logic is added to
extract "implied" versions on different branches from the top-level
versions listed in the alembic_version table.
Change-Id: I9f485fbc67555d13f737ecffdd25e4c0d8e33f1c
Fixes: #378
Fixed bug where a repr() or str() of a Script object would fail
if the script had multiple dependencies.
Change-Id: Iae866058cce4ec5a7dc499358b23b06a4bbb6ecd
Fixed bug in autogen where if the DB connection sends the default
schema as "None", this "None" would be removed from the list of
schemas to check if include_schemas were set. This could possibly
impact using include_schemas with SQLite.
Change-Id: I553cdbbe2cfaa5228d86019e14f7c9f56231f295