summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for Python 3.5 and SQLAlchemy older than the 1.3 series.CaselIT2020-10-263-8/+12
| | | | | Fixes: #748 Change-Id: I18df97bdce5de6adb222d3f16486272e95b1b1a6
* Add interim recipe for multi-tenantMike Bayer2020-09-291-0/+108
| | | | | | | | | | Alembic does not have a multi-tenant story right now. for the schema use case, search_path represents the best way to make it happen at a rudimental level. Document the basic idea for this as it is known to work for the moment. Change-Id: I14f8eebc285f67bc374eb829e5fce49dc5820c9c References: #555
* Version 1.4.4 placeholderMike Bayer2020-09-111-0/+4
|
* - 1.4.3rel_1_4_3Mike Bayer2020-09-118-54/+60
|
* Use regular renderer for MySQL server defaultMike Bayer2020-09-111-0/+8
| | | | | | | | | | Fixed issue where the MySQL dialect would not correctly render the server default of a column in an alter operation, if the operation were programmatically generated from an autogenerate pass as it would not accommodate for the full structure of the DefaultClause construct. Change-Id: I2701b396067e80c75bacbb596e24bb1e75454d10 Fixes: #736
* Fix column existence check in batch operationCaselIT2020-09-101-0/+9
| | | | | | | Existence of a column check used ``ColumnCollection.contains_column`` with a the name of the column instead of the column instance. Change-Id: I41d9f6b6ed9e44eeb9ced78b039da6261491eeee
* Remove typo in _exec_drop_col_fk_constraintOleg Shigorin2020-07-251-0/+8
| | | | | | | | | | | | | | Fixed issue where the ``mssql_drop_foreign_key=True`` flag on ``op.drop_column`` would lead to incorrect syntax error due to a typo in the SQL emitted, same typo was present in the test as well so it was not detected. Pull request courtesy Oleg Shigorin. Fixes: #716 Closes: #717 Pull-request: https://github.com/sqlalchemy/alembic/pull/717 Pull-request-sha: dcd90fb4dfe8acd63670aedbdee58be25d4781d2 Change-Id: I022a66a3bcebf689945cfbd36bed0ebed248364f
* Support DROP of named check constraint from column for batchMike Bayer2020-07-161-0/+7
| | | | | | | | | Added support to drop named CHECK constraints that are specified as part of a column, rather than table wide. Previously, only constraints associated with the table were considered. Change-Id: Id1765357e0fa59745b41ba233b18a53e38358e0b Fixes: #711
* Do not CAST(x as JSON) in SQLiteSebastián Ramírez2020-06-011-0/+9
| | | | | | | | | | | | | | | Fixed issue where the CAST applied to a JSON column when copying a SQLite table during batch mode would cause the data to be lost, as SQLite's CAST with JSON appears to convert the data to the value "0". The CAST is now skipped in a dialect-specific manner, including for JSON columns on SQLite. Pull request courtesy Sebastián Ramírez. Fixes: #697 Closes: #698 Pull-request: https://github.com/sqlalchemy/alembic/pull/698 Pull-request-sha: 6618325258bd90ec257b09c17d44421a5642b1b1 Change-Id: Ia152ea7386e64efb2194aa836dc57754f979e204
* Ensure "alembic current" won't unnecessarily mutate the databaseNikolay Edigaryev2020-05-151-0/+10
| | | | | | | | | | | | | | | The ``alembic current`` command no longer creates an ``alembic_version`` table in the database if one does not exist already, returning no version as the current version. This allows checking for migrations in parallel without introducing race conditions. Pull request courtesy Nikolay Edigaryev. Fixes: #694 Closes: #695 Pull-request: https://github.com/sqlalchemy/alembic/pull/695 Pull-request-sha: fd3e3b8faf7a41dd4c35daca6c7d224e983ab496 Change-Id: I500ab9ec1fe74b5e20e6aecfe598bce7e9cdef96
* Add members to operations, batchMike Bayer2020-05-051-0/+2
| | | | | | | | for some reason these did not have :members: and for some reason it used to work anyway. Change-Id: I2ead3dd7ffe5d313693dfca6e8b312f4e39ac743 Fixes: #689
* Add link to Alembic Utils as an example of replaceable objects.Mike Bayer2020-04-271-0/+8
| | | | | Change-Id: I9f8f423a363970814d2ca5fea2c0b2c35c34d19d References: #686
* Typo fix: appopriate -> appropriate.Danny Hermes2020-04-271-1/+1
|
* Correct issue number for issue 671Mike Bayer2020-03-191-1/+1
| | | | | | | | the patch in 52ef05c936170109f2f457751f4940e4269595c3 erroneously mentioned #617 as the target issue, when it was supposed to be #671. Change-Id: I2a327d1dc9173e62c7d65a35e65db7ec5edcf3e9 Fixes: #671
* Version 1.4.3 placeholderMike Bayer2020-03-191-0/+4
|
* - 1.4.2rel_1_4_2Mike Bayer2020-03-196-36/+40
|
* Merge "Use looser tokenization for type comparison"mike bayer2020-03-191-0/+7
|\
| * Use looser tokenization for type comparisonMike Bayer2020-03-191-0/+7
| | | | | | | | | | | | | | | | | | 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-Id: If3dcfed7b0aa2d7367e1508289a0b5ee6f4c15a7 Fixes: #617
* | Don't include schema in "to" portion of Oracle RENAME tableMike Bayer2020-03-191-0/+8
|/ | | | | | | | | 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. Change-Id: I8110a58bea20ebe48bfca0877da6bd8e0abd17c2 Fixes: #670
* Support computed reflection.Mike Bayer2020-03-181-0/+11
| | | | | | | | | | | | 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-Id: I6cf177865d074fcbfea032ce8b4d1aee82d7d098 Fixes: #669
* Don't raise on pytest deprecation warningsMike Bayer2020-03-121-0/+7
| | | | | | | | | py.test 5.4.0 emits deprecation warnings for pytest.Class. make sure we don't raise for these, and log the code that will be used for 5.4.0 when we bump requirements. Fixes: #668 Change-Id: I83e0402c4a6b2365a63b58d052c6989df3a37328
* Add custom table column sorting exampleMike Bayer2020-03-032-0/+106
| | | | Change-Id: Ie953ba34ed8e6cbf90e3070494279174ebca5d1a
* Version 1.4.2 placeholderMike Bayer2020-03-021-0/+4
|
* - 1.4.1rel_1_4_1Mike Bayer2020-03-017-44/+49
|
* Respects ResultProxy.supports_sane_rowcount()Ke Zhu2020-03-011-0/+8
| | | | | | | | | | | | | | 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. Closes: #667 Pull-request: https://github.com/sqlalchemy/alembic/pull/667 Pull-request-sha: a0d45ed0f5de582314faae2210eeec881670488e Change-Id: I09c9b540d8e21a94728085270eb20ba2273cbdb1
* Merge remote-tracking branch 'github/pr/665'Mike Bayer2020-02-281-2/+2
|\ | | | | | | Change-Id: Ic1d3a0a50fa7bebcb51af7a6b83209dc5bbb6ab9
| * Remove simple typos in autogenerate docsAshok Argent-Katwala2020-02-251-2/+2
| |
* | Merge "Include post-parenthesis tokens when tokenizing type string"mike bayer2020-02-271-0/+10
|\ \
| * | Include post-parenthesis tokens when tokenizing type stringPaul Becotte2020-02-271-0/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Fixes: #661 Closes: #662 Pull-request: https://github.com/sqlalchemy/alembic/pull/662 Pull-request-sha: 28f181247ac475069eb8cd3669331e689fc78792 Change-Id: Ie1ba69fe0b3c2084026a51b1f835b3aab66aba6a
* | Clarified an error message on failure to find 'migrations' path.Rowan Hart2020-02-251-0/+6
|/ | | | | | | | | | | | Error message for "path doesn't exist" when loading up script environment now displays the absolute path. Pull request courtesy Rowan Hart. Fixes: #663 Closes: #664 Pull-request: https://github.com/sqlalchemy/alembic/pull/664 Pull-request-sha: 29ff74c2678ab73f6c5a646477c840f5cdded234 Change-Id: Ibaa8ad444560e481ba96e0c0e3ba31ec7c7c1385
* Merge "Repair de-quoting logic used for pre-1.4 SQLAlchemy versions"mike bayer2020-02-061-0/+7
|\
| * Repair de-quoting logic used for pre-1.4 SQLAlchemy versionsMike Bayer2020-02-061-0/+7
| | | | | | | | | | | | | | | | | | 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-Id: Ic3d60f7d44377cdb4937ac0bb2bc11d27d03b8bd Fixes: #654
* | Merge "Render inline constraints for add_column"mike bayer2020-02-061-0/+10
|\ \
| * | Render inline constraints for add_columnMike Bayer2020-02-061-0/+10
| |/ | | | | | | | | | | | | | | | | | | 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. Change-Id: Ib176d13dd9151e65a1ca27357f7da0d4523f0b2f Fixes: #655
* | Version 1.4.1 placeholderMike Bayer2020-02-041-0/+4
| |
* | - 1.4.0rel_1_4_0Mike Bayer2020-02-047-58/+63
|/
* - next version will be 1.4.0Mike Bayer2020-02-041-1/+1
| | | | Change-Id: Ib2edb474a325588e1ea8ba5147704cae56be318e
* Support explicit column ordering in batch modeMarcin Szymanski2020-02-041-0/+12
| | | | | | | | | | | | | | | | | | | 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. Co-Authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Fixes: #640 Closes: #646 Pull-request: https://github.com/sqlalchemy/alembic/pull/646 Pull-request-sha: 29392b796dd995fabdabe50e8725385dbe1b4883 Change-Id: Iec9942baa08da4a7fc49b69093e84785fea3cec2
* Update the type comparison code used for schema autogeneration. ComparePaul Becotte2020-02-042-14/+61
| | | | | | | | | | | | | | | | | | | 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. Fixes: #605 Closes: #619 Pull-request: https://github.com/sqlalchemy/alembic/pull/619 Pull-request-sha: 1a6a3860881081c3b98fdbfc203f8d3af5f98926 Change-Id: I1ab30f2a30fc567cde56b5b8be5f521ff235b67b
* Merge "Use inspect(), not Inspector.from_engine()"mike bayer2020-02-041-0/+7
|\
| * Use inspect(), not Inspector.from_engine()Mike Bayer2020-02-031-0/+7
| | | | | | | | | | | | | | | | 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-Id: I81ea16e5d750d8c48d8db1a5098815988ea60f6c
* | Move use of ``__file__`` to be local to template accesslayday2020-02-031-0/+9
|/ | | | | | | | | | | | | | | 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. Partially-fixes: #648 Closes: #651 Pull-request: https://github.com/sqlalchemy/alembic/pull/651 Pull-request-sha: c30299dbc3499c59e81602d91deb3b03166b4583 Change-Id: I2607031d80c418ce4d7e779eeb42c57a53a72ce0
* Adjust unique constraint names based on dialect truncation rulesMike Bayer2020-01-301-0/+10
| | | | | | | | | | | | | | 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. Also remove unused MySQL _legacy_correct_for_dupe_uq_uix which is no longer used. Change-Id: I6f709736b845727223c88951a11a899d7dc9b356 Fixes: #647
* Version 1.3.4 placeholderMike Bayer2020-01-221-0/+4
|
* - 1.3.3rel_1_3_3Mike Bayer2020-01-224-30/+32
|
* Add support for computed columnsCaselIT2020-01-011-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. In order to facilitate using testing combinations with elements that are not necessarily present, the support for lambda combinations from SQLAlchemy Ia63a510f9c1d08b055eef62cf047f1f427f0450c is also ported here, as well as a vendoring in of the current sqlalchemy.testing.exclusions module where we need the additional combinations support added in I15d2839954d77a252bab5aaf6e3fd9f388c99dd5. Fixes: #624 Closes: #631 Pull-request: https://github.com/sqlalchemy/alembic/pull/631 Pull-request-sha: 9c45651295626edf5f172ec827a5ced1440818cf Change-Id: Ifd27c2f541b22fb7a78de1afaa36dbf509ff6d3f
* happy new yearMike Bayer2020-01-011-1/+1
| | | | Change-Id: I311bc286fe915db63eb12b23c8a726f9b6754473
* render table name with schemaMatthew Sills2019-12-191-0/+7
| | | | | | | | | | | | | 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. Fixes: #637 Closes: #636 Pull-request: https://github.com/sqlalchemy/alembic/pull/636 Pull-request-sha: 703e27bab5b2d0907367dd03a4babb00ea5ee8aa Change-Id: I319171b0596faf0bbea1b965e094d13acad14b6c
* Version 1.3.3 placeholderMike Bayer2019-12-161-0/+4
|
* - 1.3.2rel_1_3_2Mike Bayer2019-12-163-14/+15
|