github sqlalchemy/alembic rel_0_9_0
0.9.0

latest releases: rel_1_15_2, rel_1_15_1, rel_1_15_0...
5 years ago

0.9.0

Released: February 28, 2017

  • [autogenerate] [feature] The EnvironmentContext.configure.target_metadata parameter
    may now be optionally specified as a sequence of MetaData
    objects instead of a single MetaData object. The
    autogenerate process will process the sequence of MetaData
    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
    the Text() 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 directive Operations.create_exclude_constraints()
    as well as autogenerate render support for the ExcludeConstraint
    object as present in a Table. 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.

Don't miss a new alembic release

NewReleases is sending notifications on new releases.