1.0.8
bug
[bug] [operations] Removed use of deprecated force parameter for SQLAlchemy quoting functions as this parameter will be removed in a future release. Pull request courtesy Parth Shandilya(ParthS007).
[bug] [autogenerate] [postgresql] [py3k] Fixed issue where server default comparison on the PostgreSQL dialect would fail for a blank string on Python 3.7 only, due to a change in regular expression behavior in Python 3.7.
1.0.7
[bug] [autogenerate] Fixed issue in new comment support where autogenerated Python code for comments wasn’t using repr() thus causing issues with quoting
1.0.6
feature
[feature] [operations] Added Table and Column level comments for supported backends. New methods Operations.create_table_comment() and Operations.drop_table_comment() are added. A new arguments Operations.alter_column.comment and Operations.alter_column.existing_comment are added to Operations.alter_column(). Autogenerate support is also added to ensure comment add/drops from tables and columns are generated as well as that Operations.create_table(), Operations.add_column() both include the comment field from the source Table or Column object.
1.0.5
* Resolved remaining Python 3 deprecation warnings, covering the use of inspect.formatargspec() with a vendored version copied from the Python standard library, importing collections.abc above Python 3.3 when testing against abstract base classes, fixed one occurrence of log.warn(), as well as a few invalid escape sequences.
1.0.4
* Code hosting has been moved to GitHub, at https://github.com/sqlalchemy/alembic. Additionally, the main Alembic website documentation URL is now https://alembic.sqlalchemy.org.
1.0.3:
Fixed regression caused by 513, where the logic to consume mssql_include was not correctly interpreting the case where the flag was not present, breaking the op.create_index directive for SQL Server as a whole
1.0.2:
[bug] [autogenerate] The system=True flag on Column, used primarily in conjunction with the Postgresql “xmin” column, now renders within the autogenerate render process, allowing the column to be excluded from DDL. Additionally, adding a system=True column to a model will produce no autogenerate diff as this column is implicitly present in the database.
[bug] [mssql] Fixed issue where usage of the SQL Server mssql_include option within a Operations.create_index() would raise a KeyError, as the additional column(s) need to be added to the table object used by the construct internally.
1.0.1:
Fixed an issue where revision descriptions were essentially being formatted twice. Any revision description that contained characters like %, writing output to stdout will fail because the call to config.print_stdout attempted to format any additional args passed to the function. This fix now only applies string formatting if any args are provided along with the output text.
Fixed issue where removed method union_update() was used when a customized MigrationScript instance included entries in the .imports data member, raising an AttributeError.
1.0.0:
[feature] [general] For Alembic 1.0, Python 2.6 / 3.3 support is being dropped, allowing a fixed setup.py to be built as well as universal wheels. Pull request courtesy Hugo.
[feature] [general] With the 1.0 release, Alembic’s minimum SQLAlchemy support version moves to 0.9.0, previously 0.7.9.
[bug] [batch] Fixed issue in batch where dropping a primary key column, then adding it back under the same name but without the primary_key flag, would not remove it from the existing PrimaryKeyConstraint. If a new PrimaryKeyConstraint is added, it is used as-is, as was the case before.
version 0.9.10
The "op.drop_constraint()" directive will now render using repr() for
the schema name, in the same way that "schema" renders for all the other op
directives.
Added basic capabilities for external dialects to support rendering of
"nested" types, like arrays, in a manner similar to that of the Postgresql
dialect.
Fixed issue where "autoincrement=True" would not render for a column that
specified it, since as of SQLAlchemy 1.1 this is no longer the default
value for "autoincrement". Note the behavior only takes effect against the
SQLAlchemy 1.1.0 and higher; for pre-1.1 SQLAlchemy, "autoincrement=True"
does not render as was the case before.
0.9.9:
feature
Added new flag --indicate-current to the alembic history command. When listing versions, it will include the token “(current)” to indicate the given version is a current head in the target database.
bug
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.
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.
Fixed bug in op.drop_constraint() for MySQL where quoting rules would not be applied to the constraint name.
version: 0.9.8
Fixed bug where the :meth:.Script.as_revision_number method
did not accommodate for the 'heads' identifier, which in turn
caused the :meth:.EnvironmentContext.get_head_revisions
and :meth:.EnvironmentContext.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.
Fixed bug where autogenerate of :class:.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 as sa.column('name').
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.
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.
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.
0.9.7
[bug] [autogenerate] 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.
[bug] [autogenerate] [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.
0.9.6
feature
[feature] [commands] The alembic history command will now make use of the revision environment env.py unconditionally if the revision_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.
bug
[bug] [commands] Fixed a few Python3.6 deprecation warnings by replacing StopIteration with return, as well as using getfullargspec() instead of getargspec() under Python 3.
[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.
[bug] [autogenerate] Fixed bug expanding upon the fix for 85 which adds the correct module import to the “inner” type for an ARRAY type, the fix now accommodates for the generic sqlalchemy.types.ARRAY type added in SQLAlchemy 1.1, rendering the inner type correctly regardless of whether or not the Postgresql dialect is present.
[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.
[bug] [autogenerate] Fixed bug where comparison of Numeric types would produce a difference if the Python-side Numeric inadvertently specified a non-None “scale” with a “precision” of None, even though this Numeric type will pass over the “scale” argument when rendering. Pull request courtesy Ivan Mmelnychuk.
[bug] [batch] 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.
[bug] [autogenerate] 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.
[bug] [runtime] [py3k] 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 in versions/__pycache__, deduplicating version files that may be in versions/__pycache__ and versions/ 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.
Alembic is a database migrations tool written by the author of
SQLAlchemy. A migrations tool can emit ALTER statements to a database
in order to change the structure of tables and other constructs,
provides a system whereby "migration scripts" may be constructed; each
script indicates a particular series of steps that can "upgrade" a
target database to a new version, and optionally a series of steps
that can "downgrade" similarly, doing the same steps in reverse, and
allows the scripts to execute in some sequential manner.
Packaged by Kamel Ibn Aziz Derouiche and updated by me.