Skip to content

[Backend Dependencies Update] Update alembic to 1.4.2#819

Closed
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-alembic-1.2.1-to-1.4.2
Closed

[Backend Dependencies Update] Update alembic to 1.4.2#819
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-alembic-1.2.1-to-1.4.2

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

This PR updates alembic from 1.2.1 to 1.4.2.

Changelog

1.4.2

:released: March 19, 2020

 .. change::
     :tags: usecase, autogenerate
     :tickets: 669

     Adjusted autogen comparison to accommodate for backends that support
     computed column reflection, dependent on SQLAlchemy version 1.3.16 or
     higher. This emits a warning if the SQL expression inside of a
     :class:`.Computed` value changes between the metadata and the database, as
     these expressions can't be changed without dropping and recreating the
     column.


 .. change::
     :tags: bug, tests
     :tickets: 668

     Fixed an issue that prevented the test suite from running with the
     recently released py.test 5.4.0.


 .. change::
     :tags: bug, autogenerate, mysql
     :tickets: 617

     Fixed more false-positive failures produced by the new "compare type" logic
     first added in :ticket:`605`, particularly impacting MySQL string types
     regarding flags such as "charset" and "collation".

 .. change::
     :tags: bug, op directives, oracle
     :tickets: 670

     Fixed issue in Oracle backend where a table RENAME with a schema-qualified
     name would include the schema in the "to" portion, which is rejected by
     Oracle.


.. changelog::

1.4.1

:released: March 1, 2020

 .. change::
     :tags: bug, autogenerate
     :tickets: 661

     Fixed regression caused by the new "type comparison" logic introduced in
     1.4 as part of :ticket:`605` where comparisons of MySQL "unsigned integer"
     datatypes would produce false positives, as the regular expression logic
     was not correctly parsing the "unsigned" token when MySQL's default display
     width would be returned by the database.  Pull request courtesy Paul
     Becotte.

 .. change::
     :tags: bug, environment
     :tickets: 663

     Error message for "path doesn't exist" when loading up script environment
     now displays the absolute path.  Pull request courtesy Rowan Hart.

 .. change::
     :tags: bug, autogenerate
     :tickets: 654

     Fixed regression in 1.4.0 due to :ticket:`647` where unique constraint
     comparison with mixed case constraint names while not using a naming
     convention would produce false positives during autogenerate.

 .. change::
     :tags: bug, environment

     The check for matched rowcount when the alembic_version table is updated or
     deleted from is now conditional based on whether or not the dialect
     supports the concept of "rowcount" for UPDATE or DELETE rows matched.  Some
     third party dialects do not support this concept.  Pull request courtesy Ke
     Zhu.

 .. change::
     :tags: bug, operations
     :tickets: 655

     Fixed long-standing bug where an inline column CHECK constraint would not
     be rendered within an "ADD COLUMN" operation.  The DDL compiler is now
     consulted for inline constraints within the :meth:`.Operations.add_column`
     method as is done for regular CREATE TABLE operations.



.. changelog::

1.4.0

:released: February 4, 2020

 .. change::
     :tags: change

     The internal inspection routines no longer use SQLAlchemy's
     ``Inspector.from_engine()`` method, which is expected to be deprecated in
     1.4.  The ``inspect()`` function is now used.


 .. change::
     :tags: bug, autogenerate
     :tickets: 647

     Adjusted the unique constraint comparison logic in a similar manner as that
     of :ticket:`421` did for indexes in order to take into account SQLAlchemy's
     own truncation of long constraint names when a naming convention is in use.
     Without this step, a name that is truncated by SQLAlchemy based on a unique
     constraint naming convention or hardcoded name will not compare properly.


 .. change::
     :tags: feature, batch
     :tickets: 640

     Added new parameters :paramref:`.BatchOperations.add_column.insert_before`,
     :paramref:`.BatchOperations.add_column.insert_after` which provide for
     establishing the specific position in which a new column should be placed.
     Also added :paramref:`.Operations.batch_alter_table.partial_reordering`
     which allows the complete set of columns to be reordered when the new table
     is created.   Both operations apply only to when batch mode is recreating
     the whole table using ``recreate="always"``.  Thanks to Marcin Szymanski
     for assistance with the implementation.

 .. change::
     :tags: usecase, environment
     :tickets: 648

     Moved the use of the ``__file__`` attribute at the base of the Alembic
     package into the one place that it is specifically needed, which is when
     the config attempts to locate the template directory. This helps to allow
     Alembic to be fully importable in environments that are using Python
     memory-only import schemes.  Pull request courtesy layday.

 .. change::
     :tags: bug, autogenerate
     :tickets: 605

     A major rework of the "type comparison" logic is in place which changes the
     entire approach by which column datatypes are compared.  Types are now
     compared based on the DDL string generated by the metadata type vs. the
     datatype reflected from the database.  This means we compare types based on
     what would actually render and additionally if elements of the types change
     like string length, those changes are detected as well.  False positives
     like those generated between SQLAlchemy Boolean and MySQL TINYINT should
     also be resolved.   Thanks very much to Paul Becotte  for lots of hard work
     and patience on this one.

     .. seealso::

         :ref:`autogenerate_detects` - updated comments on type comparison

.. changelog::

1.3.3

:released: January 22, 2020

 .. change::
     :tags: bug, postgresql
     :tickets: 637

     Fixed issue where COMMENT directives for PostgreSQL failed to correctly
     include an explicit schema name, as well as correct quoting rules for
     schema, table, and column names.  Pull request courtesy Matthew Sills.

 .. change::
     :tags: usecase, operations
     :tickets: 624

     Added support for rendering of "computed" elements on :class:`.Column`
     objects, supported in SQLAlchemy via the new :class:`.Computed` element
     introduced in version 1.3.11. Pull request courtesy Federico Caselli.

     Note that there is currently no support for ALTER COLUMN to add, remove, or
     modify the "GENERATED ALWAYS AS" element from a column;  at least for
     PostgreSQL, it does not seem to be supported by the database. Additionally,
     SQLAlchemy does not currently reliably reflect the "GENERATED ALWAYS AS"
     phrase from an existing column, so there is also no autogenerate support
     for addition or removal of the :class:`.Computed` element to or from an
     existing column, there is only support for adding new columns that include
     the :class:`.Computed` element.  In the case that the :class:`.Computed`
     element is removed from the :class:`.Column` object in the table metadata,
     PostgreSQL and Oracle currently reflect the "GENERATED ALWAYS AS"
     expression as the "server default" which will produce an op that tries to
     drop the element as a default.

.. changelog::

1.3.2

:released: December 16, 2019

 .. change::
     :tags: bug, api, autogenerate
     :tickets: 635

     Fixed regression introduced by :ticket:`579` where server default rendering
     functions began to require a dialect implementation, however the
     :func:`.render_python_code` convenience function did not include one, thus
     causing the function to fail when used in a server default context.  The
     function now accepts a migration context argument and also creates one
     against the default dialect if one is not provided.


.. changelog::

1.3.1

:released: November 13, 2019

 .. change::
     :tags: bug, mssql
     :tickets: 621

     Fixed bug in MSSQL dialect where the drop constraint execution steps used
     to remove server default or implicit foreign key constraint failed to take
     into account the schema name of the target table.


.. changelog::

1.3.0

:released: October 31, 2019

 .. change::
     :tags: feature, command
     :tickets: 608

     Added support for ALEMBIC_CONFIG environment variable,
     refers to the location of the alembic configuration script
     in lieu of using the -c command line option.


 .. change::
     :tags: bug, autogenerate
     :tickets: 131

     Fixed bug in new Variant autogenerate where the order of the arguments to
     Variant were mistakenly reversed.

 .. change::
     :tags: change, compatibility

     Some internal modifications have been made to how the names of indexes and
     unique constraints work to make use of new functions added in SQLAlchemy
     1.4, so that SQLAlchemy has more flexibility over how naming conventions
     may be applied to these objects.

.. changelog::
Links

@pyup-bot
Copy link
Copy Markdown
Collaborator Author

Closing this in favor of #902

@pyup-bot pyup-bot closed this Sep 11, 2020
@jpowie01 jpowie01 deleted the pyup-update-alembic-1.2.1-to-1.4.2 branch September 11, 2020 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant