Releases: sqlalchemy/alembic
0.9.9
0.9.9
Released: March 22, 2018
-
[commands] [feature] Added new flag
--indicate-current
to thealembic history
command.
When listing versions, it will include the token "(current)" to indicate
the given version is a current head in the target database. Pull request
courtesy Kazutaka Mise.References: #481
-
[autogenerate] [bug] [mysql] The fix for #455 in version 0.9.6 involving MySQL server default
comparison was entirely non functional, as the test itself was also broken
and didn't reveal that it wasn't working. The regular expression to compare
server default values like CURRENT_TIMESTAMP to current_timestamp() is
repaired.References: #455
-
[autogenerate] [bug] [mysql] Fixed bug where MySQL server default comparisons were basically not working
at all due to incorrect regexp added in #455. Also accommodates
for MariaDB 10.2 quoting differences in reporting integer based server
defaults.References: #483
-
[bug] [mysql] [operations] Fixed bug in
op.drop_constraint()
for MySQL where
quoting rules would not be applied to the constraint name.References: #487
0.9.8
0.9.8
Released: February 16, 2018
-
[bug] [runtime] Fixed bug where the
Script.as_revision_number()
method
did not accommodate for the 'heads' identifier, which in turn
caused theEnvironmentContext.get_head_revisions()
andEnvironmentContext.get_revision_argument()
methods
to be not usable when multiple heads were present.
The :meth:.EnvironmentContext.get_head_revisions
method returns
a tuple in all cases as documented.References: #482
-
[autogenerate] [bug] [postgresql] Fixed bug where autogenerate of
ExcludeConstraint
would render a raw quoted name for a Column that has case-sensitive
characters, which when invoked as an inline member of the Table
would produce a stack trace that the quoted name is not found.
An incoming Column object is now rendered assa.column('name')
.References: #478
-
[autogenerate] [bug] Fixed bug where the indexes would not be included in a
migration that was dropping the owning table. The fix
now will also emit DROP INDEX for the indexes ahead of time,
but more importantly will include CREATE INDEX in the
downgrade migration.References: #468
-
[bug] [postgresql] Fixed the autogenerate of the module prefix
when rendering the text_type parameter of
postgresql.HSTORE, in much the same way that
we do for ARRAY's type and JSON's text_type.References: #480
-
[bug] [mysql] Added support for DROP CONSTRAINT to the MySQL Alembic
dialect to support MariaDB 10.2 which now has real
CHECK constraints. Note this change does not
add autogenerate support, only support for op.drop_constraint()
to work.References: #479
0.9.7
0.9.7
Released: January 16, 2018
-
[autogenerate] [bug] Fixed regression caused by #421 which would
cause case-sensitive quoting rules to interfere with the
comparison logic for index names, thus causing indexes to show
as added for indexes that have case-sensitive names. Works with
SQLAlchemy 0.9 and later series.References: #472
-
[autogenerate] [bug] [postgresql] Fixed bug where autogenerate would produce a DROP statement for the index
implicitly created by a Postgresql EXCLUDE constraint, rather than skipping
it as is the case for indexes implicitly generated by unique constraints.
Makes use of SQLAlchemy 1.0.x's improved "duplicates index" metadata and
requires at least SQLAlchemy version 1.0.x to function correctly.References: #461
0.9.6
0.9.6
Released: October 13, 2017
-
[bug] [commands] Fixed a few Python3.6 deprecation warnings by replacing
StopIteration
withreturn
, as well as usinggetfullargspec()
instead of
getargspec()
under Python 3.References: #458
-
[bug] [commands] An addition to #441 fixed in 0.9.5, we forgot to also filter
for the+
sign in migration names which also breaks due to the relative
migrations feature.References: #441
-
[autogenerate] [bug] Fixed bug expanding upon the fix for
#85 which adds the correct module import to the
"inner" type for anARRAY
type, the fix now accommodates for the
genericsqlalchemy.types.ARRAY
type added in SQLAlchemy 1.1,
rendering the inner type correctly regardless of whether or not the
Postgresql dialect is present.References: #442
-
[bug] [mysql] Fixed bug where server default comparison of CURRENT_TIMESTAMP would fail
on MariaDB 10.2 due to a change in how the function is
represented by the database during reflection.References: #455
-
[autogenerate] [bug] Fixed bug where comparison of
Numeric
types would produce
a difference if the Python-sideNumeric
inadvertently specified
a non-None "scale" with a "precision" of None, even though thisNumeric
type will pass over the "scale" argument when rendering. Pull request
courtesy Ivan Mmelnychuk. -
[commands] [feature] The
alembic history
command will now make use of the revision
environmentenv.py
unconditionally if therevision_environment
configuration flag is set to True. Previously, the environment would
only be invoked if the history specification were against a database-stored
revision token.References: #447
-
[batch] [bug] The name of the temporary table in batch mode is now generated
off of the original table name itself, to avoid conflicts for the
unusual case of multiple batch operations running against the same
database schema at the same time.References: #457
-
[autogenerate] [bug] A
ForeignKeyConstraint
can now render correctly if the
link_to_name
flag is set, as it will not attempt to resolve the name
from a "key" in this case. Additionally, the constraint will render
as-is even if the remote column name isn't present on the referenced
remote table.References: #456
-
[bug] [py3k] [runtime] Reworked "sourceless" system to be fully capable of handling any
combination of: Python2/3x, pep3149 or not, PYTHONOPTIMIZE or not,
for locating and loading both env.py files as well as versioning files.
This includes: locating files inside of__pycache__
as well as listing
out version files that might be only inversions/__pycache__
, deduplicating
version files that may be inversions/__pycache__
andversions/
at the same time, correctly looking for .pyc or .pyo files based on
if pep488 is present or not. The latest Python3x deprecation warnings
involving importlib are also corrected.References: #449
0.9.5
0.9.5
Released: August 9, 2017
-
[bug] [commands] A
CommandError
is raised if the "--rev-id" passed to the
revision()
command contains dashes or at-signs, as this interferes
with the command notation used to locate revisions.References: #441
-
[bug] [postgresql] Added support for the dialect-specific keyword arguments
toOperations.drop_index()
. This includes support for
postgresql_concurrently
and others.References: #424
-
[bug] [commands] Fixed bug in timezone feature introduced in
#425 when the creation
date in a revision file is calculated, to
accommodate for timezone names that contain
mixed-case characters in their name as opposed
to all uppercase. Pull request courtesy Nils
Philippsen.
0.9.4
0.9.4
Released: July 31, 2017
- [bug] [runtime] Added an additional attribute to the new
EnvironmentContext.configure.on_version_apply
API,
MigrationInfo.up_revision_ids
, to accommodate for the uncommon
case of thealembic stamp
command being used to move from multiple
branches down to a common branchpoint; there will be multiple
"up" revisions in this one case.
0.9.3
0.9.3
Released: July 6, 2017
-
[feature] [runtime] Added a new callback hook
EnvironmentContext.configure.on_version_apply
,
which allows user-defined code to be invoked each time an individual
upgrade, downgrade, or stamp operation proceeds against a database.
Pull request courtesy John Passaro. -
[autogenerate] [bug] Fixed bug where autogen comparison of a
Variant
datatype
would not compare to the dialect level type for the "default"
implementation of theVariant
, returning the type as changed
between database and table metadata.References: #433
-
[bug] [tests] Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
prior to version 1.0.10 where a particular bug involving Postgresql
exclude constraints was fixed.References: #431
0.9.2
0.9.2
Released: May 18, 2017
-
[bug] [mssql] Repaired
Operations.rename_table()
for SQL Server when the
target table is in a remote schema, the schema name is omitted from
the "new name" argument.References: #429
-
[commands] [feature] Added a new configuration option
timezone
, a string timezone name
that will be applied to the create date timestamp rendered
inside the revision file as made availble to thefile_template
used
to generate the revision filename. Note this change adds the
python-dateutil
package as a dependency.References: #425
-
[autogenerate] [bug] The autogenerate compare scheme now takes into account the name truncation
rules applied by SQLAlchemy's DDL compiler to the names of the
Index
object, when these names are dynamically truncated
due to a too-long identifier name. As the identifier truncation is
deterministic, applying the same rule to the metadata name allows
correct comparison to the database-derived name.References: #421
-
[bug environment] A warning is emitted when an object that's not a
~sqlalchemy.engine.Connection
is passed to
EnvironmentContext.configure()
. For the case of a
~sqlalchemy.engine.Engine
passed, the check for "in transaction"
introduced in version 0.9.0 has been relaxed to work in the case of an
attribute error, as some users appear to be passing an
~sqlalchemy.engine.Engine
and not a
~sqlalchemy.engine.Connection
.References: #419
0.9.1
0.9.1
Released: March 1, 2017
0.9.0
0.9.0
Released: February 28, 2017
-
[autogenerate] [feature] The
EnvironmentContext.configure.target_metadata
parameter
may now be optionally specified as a sequence ofMetaData
objects instead of a singleMetaData
object. The
autogenerate process will process the sequence ofMetaData
objects in order.References: #38
-
[bug] [commands] A
CommandError
is now raised when a migration file opens
a database transaction and does not close/commit/rollback, when
the backend database or environment options also specify transactional_ddl
is False. When transactional_ddl is not in use, Alembic doesn't
close any transaction so a transaction opened by a migration file
will cause the following migrations to fail to apply.References: #369
-
[autogenerate] [bug] [mysql] The
autoincrement=True
flag is now rendered within the
Operations.alter_column()
operation if the source column indicates
that this flag should be set to True. The behavior is sensitive to
the SQLAlchemy version in place, as the "auto" default option is new
in SQLAlchemy 1.1. When the source column indicates autoincrement
as True or "auto", the flag will render as True if the original column
contextually indicates that it should have "autoincrement" keywords,
and when the source column explcitly sets it to False, this is also
rendered. The behavior is intended to preserve the AUTO_INCREMENT flag
on MySQL as the column is fully recreated on this backend. Note that this
flag does not support alteration of a column's "autoincrement" status,
as this is not portable across backends.References: #413
-
[bug] [postgresql] Fixed bug where Postgresql JSON/JSONB types rendered on SQLAlchemy
1.1 would render the "astext_type" argument which defaults to
theText()
type without the module prefix, similarly to the
issue with ARRAY fixed in #85.References: #411
-
[bug] [postgresql] Fixed bug where Postgresql ARRAY type would not render the import prefix
for the inner type; additionally, user-defined renderers take place
for the inner type as well as the outer type. Pull request courtesy
Paul Brackin.References: #85
-
[autogenerate] [feature] Added a keyword argument
process_revision_directives
to the
command.revision()
API call. This function acts in the
same role as the environment-level
EnvironmentContext.configure.process_revision_directives
,
and allows API use of the
command to drop in an ad-hoc directive process function. This
function can be used among other things to place a complete
MigrationScript
structure in place. -
[feature] [postgresql] Added support for Postgresql EXCLUDE constraints, including the
operation directiveOperations.create_exclude_constraints()
as well as autogenerate render support for theExcludeConstraint
object as present in aTable
. Autogenerate detection for an EXCLUDE
constraint added or removed to/from an existing table is not
implemented as the SQLAlchemy Postgresql dialect does not yet support
reflection of EXCLUDE constraints.Additionally, unknown constraint types now warn when
encountered within an autogenerate action rather than raise.References: #412
-
[bug] [operations] Fixed bug in
ops.create_foreign_key()
where the internal table
representation would not be created properly if the foriegn key referred
to a table in a different schema of the same name. Pull request
courtesy Konstantin Lebedev.