]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/log
thirdparty/sqlalchemy/alembic.git
3 years agoVersion 1.7.4 placeholder
Mike Bayer [Fri, 17 Sep 2021 15:29:34 +0000 (11:29 -0400)] 
Version 1.7.4 placeholder

3 years ago- 1.7.3 rel_1_7_3
Mike Bayer [Fri, 17 Sep 2021 15:28:22 +0000 (11:28 -0400)] 
- 1.7.3

3 years agoMerge "Fix constraint_name type of create_foreign_key"
mike bayer [Fri, 17 Sep 2021 15:27:41 +0000 (15:27 +0000)] 
Merge "Fix constraint_name type of create_foreign_key"

3 years agoVersion 1.7.3 placeholder
Mike Bayer [Fri, 17 Sep 2021 14:06:36 +0000 (10:06 -0400)] 
Version 1.7.3 placeholder

3 years ago- 1.7.2 rel_1_7_2
Mike Bayer [Fri, 17 Sep 2021 13:59:36 +0000 (09:59 -0400)] 
- 1.7.2

3 years agoFix constraint_name type of create_foreign_key
TilmanK [Tue, 14 Sep 2021 19:39:59 +0000 (15:39 -0400)] 
Fix constraint_name type of create_foreign_key

Fixed type annotations for the "constraint_name" argument of operations
``create_primary_key()``, ``create_foreign_key()``.  Pull request courtesy
TilmanK.

Closes: #914
Pull-request: https://github.com/sqlalchemy/alembic/pull/914
Pull-request-sha: 39d44af226b2103da3964daf3229880a0958b97c

Change-Id: Iec4b392c70ae0eeda06dcbfda95a2f044e976686

3 years agoMerge "render 3rd party module annotations as forward references"
mike bayer [Fri, 17 Sep 2021 13:23:00 +0000 (13:23 +0000)] 
Merge "render 3rd party module annotations as forward references"

3 years agorender 3rd party module annotations as forward references
Mike Bayer [Wed, 15 Sep 2021 20:43:45 +0000 (16:43 -0400)] 
render 3rd party module annotations as forward references

Fixed issue where registration of custom ops was prone to failure due to
the registration process running ``exec()`` on generated code that as of
the 1.7 series includes pep-484 annotations, which in the case of end user
code would result in name resolution errors when the exec occurs. The logic
in question has been altered so that the annotations are rendered as
forward references so that the ``exec()`` can proceed.

Change-Id: I142b89e2f6354b2ce253f3b8109f59fa3aae68ef
Fixes: #920
3 years agoAdded missing attributes from context stubs.
CaselIT [Mon, 6 Sep 2021 21:22:30 +0000 (23:22 +0200)] 
Added missing attributes from context stubs.

Fixes: #900
Change-Id: I2e21b6f363bf6405bd472c9aca04fbbc3c9cc384

3 years agoAdds exception when trying to run write_pyi.py with Python < 3.9
TilmanK [Tue, 14 Sep 2021 19:43:30 +0000 (15:43 -0400)] 
Adds exception when trying to run write_pyi.py with Python < 3.9

### Description
write_pyi.py now raises an exception when someone tries to run the script with Python version 3.8 or smaller.

This also fixes:
- When using absolute Paths, i.e. on Windows, they are now converted to relative paths to avoid useless changes in the doc strings of the pyi files
- Corrected destination_path argument type when calling `generate_pyi_for_proxy` in `run_file`
- A comment typo

Fixes: #915
Closes: #919
Pull-request: https://github.com/sqlalchemy/alembic/pull/919
Pull-request-sha: e885d27ac5509858c8cb2927310f6195fc1d6004

Change-Id: Ia33d32b2828e71185186afc49848ce89d48a8323

3 years agoMerge "use in-package imports"
mike bayer [Tue, 14 Sep 2021 17:00:08 +0000 (17:00 +0000)] 
Merge "use in-package imports"

3 years agouse in-package imports
Mike Bayer [Mon, 13 Sep 2021 18:58:06 +0000 (14:58 -0400)] 
use in-package imports

Fixed an import in one of the .pyi files that was triggering an
assertion error in some versions of mypy.

Change-Id: Ifc663a876ebe5bebf8411c1eb451f2a25fe4dec0
Fixes: #897
3 years agoMerge branch 'workflow_test_mypy' into master-gerrit
CaselIT [Mon, 13 Sep 2021 19:19:07 +0000 (21:19 +0200)] 
Merge branch 'workflow_test_mypy' into master-gerrit
Change-Id: Ifb5f035a83341b4ccf0d615ab4d6ba23ca7f1573

3 years agoAdd mypy to the github workflow 918/head
CaselIT [Mon, 13 Sep 2021 19:11:22 +0000 (21:11 +0200)] 
Add mypy to the github workflow

Fixes: #917
Change-Id: I77d8a3673eb6d990ca947c59f6960925561d122a

3 years agoMerge remote-tracking branch 'github/pr/911'
Mike Bayer [Mon, 13 Sep 2021 18:48:50 +0000 (14:48 -0400)] 
Merge remote-tracking branch 'github/pr/911'

Change-Id: Id661e1e1f81e0ab8e17dab2479d9223e425f471b

3 years agoFix/typos doc build (#910)
Kevin Kirsche [Sat, 11 Sep 2021 20:39:08 +0000 (16:39 -0400)] 
Fix/typos doc build (#910)

* fix: typos in docs/build/batch.rst

* fix: typos in docs/build/autogenerate.rst

* fix: typos in docs/build/changelog.rst

3 years agofix: typos in doc/build/api (#909)
Kevin Kirsche [Sat, 11 Sep 2021 20:37:23 +0000 (16:37 -0400)] 
fix: typos in doc/build/api (#909)

3 years ago[DOCS]: Remove suggestion to use branched connections 911/head
Chris Sewell [Sat, 11 Sep 2021 06:12:10 +0000 (08:12 +0200)] 
[DOCS]: Remove suggestion to use branched connections

Fixes #908

3 years agoadd missing resources from alembic doc build
Mike Bayer [Thu, 9 Sep 2021 12:27:21 +0000 (08:27 -0400)] 
add missing resources from alembic doc build

Change-Id: I0f1c3a67edf35ab9ea2b0ac0689f68e8b4dee99d
Fixes: #907
3 years agoclarify that only named check constraints are regenerated
Mike Bayer [Wed, 1 Sep 2021 14:57:00 +0000 (10:57 -0400)] 
clarify that only named check constraints are regenerated

Change-Id: Ie0489137122d6ccedfa7c1af44dc8420a0842ee8
References: #400

3 years agoVersion 1.7.2 placeholder
Mike Bayer [Mon, 30 Aug 2021 21:51:30 +0000 (17:51 -0400)] 
Version 1.7.2 placeholder

3 years ago- 1.7.1 rel_1_7_1
Mike Bayer [Mon, 30 Aug 2021 21:49:50 +0000 (17:49 -0400)] 
- 1.7.1

3 years agocheck all directives in batch block until recreate selected
Mike Bayer [Mon, 30 Aug 2021 20:02:02 +0000 (16:02 -0400)] 
check all directives in batch block until recreate selected

Fixed regression in batch mode due to :ticket:`883` where the "auto" mode
of batch would fail to accommodate any additional migration directives
beyond encountering an ``add_column()`` directive, due to a mis-application
of the conditional logic that was added as part of this change, leading to
"recreate" mode not being used in cases where it is required for SQLite
such as for unique constraints.

Change-Id: I6315569caff5f3b33d152974ebecc8b18d9cc523
Fixes: #896
3 years agorestore default values for keyword arguments in stubs
Mike Bayer [Mon, 30 Aug 2021 18:30:37 +0000 (14:30 -0400)] 
restore default values for keyword arguments in stubs

Fixed issue in generated .pyi files where default values for ``Optional``
arguments were missing, thereby causing mypy to consider them as required.

Change-Id: I08c4cd7bd04c6763fdc9c5b42abbdcca8fd90e0e
Fixes: #895
3 years agofix mypy errors
CaselIT [Mon, 30 Aug 2021 19:39:40 +0000 (21:39 +0200)] 
fix mypy errors

Change-Id: If49e0ff00f0b00ed914ddb8979ae49c3a8a10a0e

3 years agoDo not tag wheel as being compatible with Python 2
layday [Mon, 30 Aug 2021 17:30:05 +0000 (13:30 -0400)] 
Do not tag wheel as being compatible with Python 2

Corrected "universal wheel" directive in setup.cfg so that building a wheel
does not target Python 2. The PyPi files index for 1.7.0 was corrected
manually. Pull request courtesy layday.

Fixes: #893
Closes: #894
Pull-request: https://github.com/sqlalchemy/alembic/pull/894
Pull-request-sha: 577afdbe5906247493182df95fe5e5338ac23080

Change-Id: I26ca6d9e3e8064d22713926707a53cb57a69d8e7

3 years agoVersion 1.7.1 placeholder
Mike Bayer [Mon, 30 Aug 2021 15:12:17 +0000 (11:12 -0400)] 
Version 1.7.1 placeholder

3 years ago- 1.7.0 rel_1_7_0
Mike Bayer [Mon, 30 Aug 2021 15:02:39 +0000 (11:02 -0400)] 
- 1.7.0

3 years agobump importlib.resources req to 3.9
Mike Bayer [Fri, 27 Aug 2021 16:38:16 +0000 (12:38 -0400)] 
bump importlib.resources req to 3.9

The importlib.resources.files() API was not added until 3.9.

Change-Id: I62ef8974d6637394448346d7e0f86c6dd93f81a7

3 years agochangelog updates
Mike Bayer [Thu, 26 Aug 2021 22:37:35 +0000 (18:37 -0400)] 
changelog updates

Change-Id: I84519c685e2f0a7ac84fe866f33a8451cfc495e2

3 years agodecouple pyproject.toml from the test suite
Mike Bayer [Thu, 26 Aug 2021 22:25:29 +0000 (18:25 -0400)] 
decouple pyproject.toml from the test suite

tools/write_pyi.py is run as part of the test suite,
which has to run from a source distribution, which
does not have pyproject.toml right now due to
issues reported w/ pip.  these pip issues are probably
resolved now however we have not gone back to including
pyproject.toml at the moment.   so we therefore have to
hardcode the single "-l79" black config option in
write_pyi.py.

Change-Id: I877f69eb2322f6cbb39ed4c6d4a9adf598703223

3 years agoalso include py.typed
Mike Bayer [Thu, 26 Aug 2021 22:16:09 +0000 (18:16 -0400)] 
also include py.typed

Change-Id: I8f41eeaf517dfb52f1ddad0a3735f61545bea205

3 years agoadjust manifest to accommodate .pyi files
Mike Bayer [Thu, 26 Aug 2021 21:55:15 +0000 (17:55 -0400)] 
adjust manifest to accommodate .pyi files

Change-Id: I51c7c04c609dd008921e803596c53a48c8b247c0

3 years agoMerge "Add test to ensure method given in #880 works"
mike bayer [Wed, 25 Aug 2021 18:22:21 +0000 (18:22 +0000)] 
Merge "Add test to ensure method given in #880 works"

3 years agoAdd test to ensure method given in #880 works
Mike Bayer [Tue, 24 Aug 2021 15:02:52 +0000 (11:02 -0400)] 
Add test to ensure method given in #880 works

Change-Id: I05dae157320be49eb598084388196e72896bc89d
Fixes: #880
3 years agoMerge "remove dependency on pkg_resources"
mike bayer [Wed, 25 Aug 2021 17:26:49 +0000 (17:26 +0000)] 
Merge "remove dependency on pkg_resources"

3 years agoMerge "support named CHECK constraints in batch"
mike bayer [Tue, 24 Aug 2021 14:45:37 +0000 (14:45 +0000)] 
Merge "support named CHECK constraints in batch"

3 years agosupport named CHECK constraints in batch
Mike Bayer [Mon, 23 Aug 2021 17:31:57 +0000 (13:31 -0400)] 
support named CHECK constraints in batch

Named CHECK constraints are now supported by batch mode, and will
automatically be part of the recreated table assuming they are named. They
also can be explicitly dropped using ``op.drop_constraint()``. For
"unnamed" CHECK constraints, these are still skipped as they cannot be
distinguished from the CHECK constraints that are generated by the
``Boolean`` and ``Enum`` datatypes.

Note that this change may require adjustments to migrations that drop or
rename columns which feature an associated named check constraint, such
that an additional ``op.drop_constraint()`` directive should be added for
that named constraint as there will no longer be an associated column
for it; for the ``Boolean`` and ``Enum`` datatypes, an ``existing_type``
keyword may be passed to ``BatchOperations.drop_constraint`` as well.

Fixes: #884
Change-Id: I3694430f7c9735bcc3b0765893b333cc8e0d1cd3

3 years agoappend the path to write_pyi script.
CaselIT [Mon, 23 Aug 2021 22:14:58 +0000 (00:14 +0200)] 
append the path to write_pyi script.

This allows running without having alembic installed

Change-Id: I1cc4f108916233e7b149485a42cae759e7e3b577

3 years agoremove dependency on pkg_resources
Mike Bayer [Mon, 23 Aug 2021 20:24:26 +0000 (16:24 -0400)] 
remove dependency on pkg_resources

The dependency on ``pkg_resources`` which is part of ``setuptools`` has
been removed, so there is no longer any runtime dependency on
``setuptools``. The functionality has been replaced with
``importlib.metadata`` and ``importlib.resources`` which are both part of
Python std.lib, or via pypy dependency ``importlib-metadata`` for Python
version < 3.8 and ``importlib-resources`` for Python version < 3.7.

Change-Id: I7802fe72ff644f52ae2edde53bc8e16f016b7c45
Fixes: #885
3 years agoavoid importing ForwardRef that's py3.9+ only
CaselIT [Mon, 23 Aug 2021 18:54:00 +0000 (20:54 +0200)] 
avoid importing ForwardRef that's py3.9+ only

Change-Id: I76654f10e208d618e21ab0c884cb0abede4d6177

3 years agoMerge "Fix postgresql_include in create_index"
mike bayer [Mon, 23 Aug 2021 18:19:16 +0000 (18:19 +0000)] 
Merge "Fix postgresql_include in create_index"

3 years agoFix postgresql_include in create_index
Steven Bronson [Thu, 19 Aug 2021 16:06:25 +0000 (12:06 -0400)] 
Fix postgresql_include in create_index

Fixed issue where usage of the PostgreSQL ``postgresql_include`` option
within a :meth:`.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. The issue is equivalent to the SQL Server issue fixed
in :ticket:`513`. Pull request courtesy Steven Bronson.

Copied from e01041b and 174cb4b.

Fixes: #874
Closes: #875
Pull-request: https://github.com/sqlalchemy/alembic/pull/875
Pull-request-sha: 2f9b51890a1296146bcea842dc8bbee53d1d11f5

Change-Id: I68cc2a75dafd3297c5121c5125ff9c463c74f777

3 years agogenerate .pyi files for proxied classes
Mike Bayer [Wed, 11 Aug 2021 19:58:16 +0000 (15:58 -0400)] 
generate .pyi files for proxied classes

Stub .pyi files have been added for the "dynamically"
generated Alembic modules ``alembic.op`` and ``alembic.context``, which
include complete function signatures and docstrings, so that the functions
in these namespaces will have both IDE support (vscode, pycharm, etc) as
well as support for typing tools like Mypy. The files themselves are
statically generated from their source functions within the source tree.

Still not available is sphinx autodoc from the .pyi file.  so
we might want to further modify this to write into the .py directly.

if we do *that*, we could almost get rid of ModuleClsProxy and
just generate proxying methods fully in op.py.  however, this won't work
for the "extending ops" use case.

Change-Id: I3f084040de25ed3f8e92a4e9d0bb83d69b78eac6

3 years agoAdd pep-484 type annotations
CaselIT [Sun, 18 Apr 2021 13:44:50 +0000 (15:44 +0200)] 
Add pep-484 type annotations

pep-484 type annotations have been added throughout the library. This
should be helpful in providing Mypy and IDE support, however there is not
full support for Alembic's dynamically modified "op" namespace as of yet; a
future release will likely modify the approach used for importing this
namespace to be better compatible with pep-484 capabilities.

Type originally created using MonkeyType

Add types extracted with the MonkeyType https://github.com/instagram/MonkeyType
library by running the unit tests using ``monkeytype run -m pytest tests``, then
``monkeytype apply <module>`` (see below for further details).
USed MonkeyType version 20.5 on Python 3.8, since newer version have issues

After applying the types, the new imports are placed in a ``TYPE_CHECKING`` guard
and all type definition of non base types are deferred by using the string notation.

NOTE: since to apply the types MonkeType need to import the module, also the test
ones, the patch below mocks the setup done by pytest so that the tests could be
correctly imported

diff --git a/alembic/testing/__init__.py b/alembic/testing/__init__.py
index bdd1746..b1090c7 100644

Change-Id: Iff93628f4b43c740848871ce077a118db5e75d41
--- a/alembic/testing/__init__.py
+++ b/alembic/testing/__init__.py
@@ -9,6 +9,12 @@ from sqlalchemy.testing.config import combinations
 from sqlalchemy.testing.config import fixture
 from sqlalchemy.testing.config import requirements as requires

+from sqlalchemy.testing.plugin.pytestplugin import PytestFixtureFunctions
+from sqlalchemy.testing.plugin.plugin_base import _setup_requirements
+
+config._fixture_functions = PytestFixtureFunctions()
+_setup_requirements("tests.requirements:DefaultRequirements")
+
 from alembic import util
 from .assertions import assert_raises
 from .assertions import assert_raises_message

Currently I'm using this branch of the sqlalchemy stubs:
https://github.com/sqlalchemy/sqlalchemy2-stubs/tree/alembic_updates

Change-Id: I8fd0700aab1913f395302626b8b84fea60334abd

3 years agofix release num in changelog
Mike Bayer [Wed, 11 Aug 2021 15:13:46 +0000 (11:13 -0400)] 
fix release num in changelog

Change-Id: I30540e78650c038f8fd5f6c8247bac7a28495bf7

3 years agoadd req for sqlite computed columns
Mike Bayer [Tue, 10 Aug 2021 19:41:38 +0000 (15:41 -0400)] 
add req for sqlite computed columns

older Python 3.6 has a sqlite that doesn't support this

Change-Id: Ie65ef7fabeae2f5142573247548dd50d6d1708dd

3 years agoMerge "qualify sqlite batch add column for dynamic defaults"
mike bayer [Tue, 10 Aug 2021 19:32:12 +0000 (19:32 +0000)] 
Merge "qualify sqlite batch add column for dynamic defaults"

3 years agoqualify sqlite batch add column for dynamic defaults
Mike Bayer [Sat, 7 Aug 2021 15:48:19 +0000 (11:48 -0400)] 
qualify sqlite batch add column for dynamic defaults

Batch "auto" mode will now select for "recreate" if the ``add_column()``
operation is used on SQLite, and the column itself meets the criteria for
SQLite where ADD COLUMN is not allowed, in this case a functional or
parenthesized SQL expression or a ``Computed`` (i.e. generated) column.

Change-Id: Ie948b4b8ad8dc698b458403831e47bac4ad45b8a
Fixes: #883
3 years agoPreserve comment and info in Drop/CreateTableOp
Nicolas CANIART [Tue, 10 Aug 2021 14:36:55 +0000 (10:36 -0400)] 
Preserve comment and info in Drop/CreateTableOp

Fixed regression due to :ticket:`803` where the ``.info`` and ``.comment``
attributes of ``Table`` would be lost inside of the :class:`.DropTableOp`
class, which when "reversed" into a :class:`.CreateTableOp` would then have
lost these elements. Pull request courtesy Nicolas CANIART.

Fixes: #879
Closes: #881
Pull-request: https://github.com/sqlalchemy/alembic/pull/881
Pull-request-sha: e509b9e8180085998e32746721eeb9266b9f2145

Change-Id: I84a0680266fcf80f3dc922f3cbc76dabd74eedd3

4 years agoCorrect typo in documention, closes #872 873/head
Adam Parkin [Mon, 12 Jul 2021 19:39:19 +0000 (12:39 -0700)] 
Correct typo in documention, closes #872

4 years agoAdd changelog entry for test suite
Gord Thompson [Thu, 1 Jul 2021 18:09:35 +0000 (12:09 -0600)] 
Add changelog entry for test suite

Change-Id: Ibb1aba8f714bc167068a58069426591b5361bf3a

4 years agorepair py3k merge
Mike Bayer [Sat, 26 Jun 2021 14:29:43 +0000 (10:29 -0400)] 
repair py3k merge

in 79f84f71e1045aafed389e7b221 I merged without rebasing
so we missed updating the recent version_locations patch,
fix that.

also we don't need mock as a test dependency.

Change-Id: Ic2fe1db8b105c60ec51eefec7a4dc8d8c495b119

4 years agoMerge "Drop compatibility with python 2.7."
mike bayer [Sat, 26 Jun 2021 14:20:13 +0000 (14:20 +0000)] 
Merge "Drop compatibility with python 2.7."

4 years agoMerge "Support version_locations paths with spaces"
mike bayer [Wed, 23 Jun 2021 18:32:24 +0000 (18:32 +0000)] 
Merge "Support version_locations paths with spaces"

4 years agoAdd requirement to AutogenerateForeignKeysTest
gordthompson [Wed, 23 Jun 2021 12:13:02 +0000 (06:13 -0600)] 
Add requirement to AutogenerateForeignKeysTest

Change-Id: I4c4313488870f8975ced451709bd2a99fa530271

4 years agoDrop compatibility with python 2.7.
CaselIT [Sun, 18 Apr 2021 09:41:04 +0000 (11:41 +0200)] 
Drop compatibility with python 2.7.

Now alembic supports only python from version 3.6.

Change-Id: Iccf124c2d74af801d90a16c9003cdad318768625

4 years agoSupport version_locations paths with spaces
Gord Thompson [Sat, 12 Jun 2021 21:12:17 +0000 (15:12 -0600)] 
Support version_locations paths with spaces

Fixes: #842
Change-Id: Icae7899cecc137eaba26cd14ded9da89df35aae1

4 years agoUpdate README.unittests.rst re: test suite
Gord Thompson [Sun, 20 Jun 2021 19:48:59 +0000 (13:48 -0600)] 
Update README.unittests.rst re: test suite

Change-Id: Id7c0c06eb0826b50b55a4f0e18b4fbe397714a23

4 years agoImplement "test suite"
Gord Thompson [Tue, 8 Jun 2021 22:56:39 +0000 (16:56 -0600)] 
Implement "test suite"

Fixes: #855
Change-Id: I11386597d9f3a260d7349b58d276b44d78642a6a

4 years agorepair py2k support
Mike Bayer [Wed, 16 Jun 2021 17:39:03 +0000 (13:39 -0400)] 
repair py2k support

the editor patch had some py3 isms as a result of us disabling
the python 2 tests in gerrit.   need to move forward w/ the py3k
or re-enable py2k

Change-Id: If47b0ebc105131fd3e7b8e6d76e0555da1484b8c

4 years agoMerge "Revendor editor and make dateutil optional"
mike bayer [Wed, 16 Jun 2021 15:37:48 +0000 (15:37 +0000)] 
Merge "Revendor editor and make dateutil optional"

4 years agoRevendor editor and make dateutil optional
CaselIT [Tue, 15 Jun 2021 20:32:05 +0000 (22:32 +0200)] 
Revendor editor and make dateutil optional

Re-implemented the ``python-editor`` dependency as a small internal
function to avoid the need for external dependencies.
The implementation is based on the original
version in 7b91b325ff43a0e9235e0f15b57391fa92352626.

Make the ``python-dateutil`` library an optional dependency.
This library is only required if the ``timezone`` option
is used in the Alembic configuration.
An extra require named ``tz`` is available with
``pip install alembic[tz]`` to install it.

Fixes: #674
Fixes: #856
Change-Id: I07f17b2fea01e3a3d677ce95333fe3e8d8d438fd

4 years agoremove python 2 from github workflow
CaselIT [Tue, 15 Jun 2021 20:53:38 +0000 (22:53 +0200)] 
remove python 2 from github workflow

Change-Id: I7dd74078ecea74ba85cb5c0d6f78f7270ee1287f

4 years agoAdd async as template (#858)
Nurgazy Nazhimidinov [Tue, 15 Jun 2021 20:48:36 +0000 (23:48 +0300)] 
Add async as template (#858)

It seems that latest version of alembic lists `async` as template

4 years agoupdate issue template to favor discussions in most cases
Mike Bayer [Tue, 15 Jun 2021 14:19:54 +0000 (10:19 -0400)] 
update issue template to favor discussions in most cases

Change-Id: I1b6044c01c59d060395933818706ef75acc46cdb

4 years agoMinor updates to .gitignore
Gord Thompson [Thu, 3 Jun 2021 15:25:41 +0000 (09:25 -0600)] 
Minor updates to .gitignore

Change-Id: I367baf75a1ac66149264bc94ba18be0076958e95

4 years agoVersion 1.6.6 placeholder
Mike Bayer [Thu, 27 May 2021 19:50:49 +0000 (15:50 -0400)] 
Version 1.6.6 placeholder

4 years ago- 1.6.5 rel_1_6_5
Mike Bayer [Thu, 27 May 2021 19:49:10 +0000 (15:49 -0400)] 
- 1.6.5

4 years agoAdd kwargs support to DropIndexOp autogenerate render
Jet Zhou [Thu, 27 May 2021 18:26:51 +0000 (14:26 -0400)] 
Add kwargs support to DropIndexOp autogenerate render

Fixed issue where dialect-specific keyword arguments within the
:class:`.DropIndex` operation directive would not render in the
autogenerated Python code. As support was improved for adding dialect
specific arguments to directives as part of :ticket:`803`, in particular
arguments such as "postgresql_concurrently" which apply to the actual
create/drop of the index, support was needed for these to render even in a
drop index operation. Pull request courtesy Jet Zhou.

Fixes: #849
Closes: #852
Pull-request: https://github.com/sqlalchemy/alembic/pull/852
Pull-request-sha: 6392a287179ed746f709ba1e0e07ccab3ea8e4c6

Change-Id: I9b602178c32d6c6a41c0dbe0969a19bd4fa329bd

4 years agoVersion 1.6.5 placeholder
Mike Bayer [Mon, 24 May 2021 20:40:14 +0000 (16:40 -0400)] 
Version 1.6.5 placeholder

4 years ago- 1.6.4 rel_1_6_4
Mike Bayer [Mon, 24 May 2021 20:38:36 +0000 (16:38 -0400)] 
- 1.6.4

4 years agodifferentiate CreateTableOp from model vs. op.create_table()
Mike Bayer [Mon, 24 May 2021 20:14:30 +0000 (16:14 -0400)] 
differentiate CreateTableOp from model vs. op.create_table()

Fixed regression caused by just fixed :ticket:`844` that scaled back the
filter for ``unique=True/index=True`` too far such that these directives no
longer worked for the ``op.create_table()`` op, this has been fixed.

Change-Id: Idbed889ef4fbb7b3a944d3f4631f1cae53030316
Fixes: #848
4 years agoVersion 1.6.4 placeholder
Mike Bayer [Fri, 21 May 2021 20:52:56 +0000 (16:52 -0400)] 
Version 1.6.4 placeholder

4 years ago- 1.6.3 rel_1_6_3
Mike Bayer [Fri, 21 May 2021 20:48:51 +0000 (16:48 -0400)] 
- 1.6.3

4 years agoMerge "De-duplicate Revision.down_revision helpers."
mike bayer [Fri, 21 May 2021 15:32:54 +0000 (15:32 +0000)] 
Merge "De-duplicate Revision.down_revision helpers."

4 years agoDe-duplicate Revision.down_revision helpers.
Simon Bowly [Thu, 20 May 2021 21:46:04 +0000 (07:46 +1000)] 
De-duplicate Revision.down_revision helpers.

Fixes an issue when downgrading a revision where dependencies
are duplicated (e.g. by specifying the down_revision in depends_on).
This causes the down migrations to fail to remove the head, which is
caught by an assertion.

Added logic to de-duplicate the entries in _normalized_down_revisions
and _all_down_revisions without altering revision order.

This change revises the previous approach taken in
8d5a9a1b0d32fff5726010afffa48cc0fb738238 to address the problem
more generally outside of the topological algorithm.

Fixes: #843
Change-Id: I3517fb102b38c783c9a61bfb8dabc02c1fc89c4b

4 years agoMerge "Remove unique/index flags when copying table"
mike bayer [Thu, 20 May 2021 21:36:04 +0000 (21:36 +0000)] 
Merge "Remove unique/index flags when copying table"

4 years agoRemove unique/index flags when copying table
Mike Bayer [Thu, 20 May 2021 17:06:52 +0000 (13:06 -0400)] 
Remove unique/index flags when copying table

Fixed 1.6-series regression where ``UniqueConstraint`` and to a lesser
extent ``Index`` objects would be doubled up in the generated model when
the ``unique=True`` / ``index=True`` flags were used.

Change-Id: Idb21891d66cc8d46b257f53062660ce1d4825fb8
Fixes: #844
4 years agoensure heads remain unique in topological
Mike Bayer [Thu, 20 May 2021 18:17:53 +0000 (14:17 -0400)] 
ensure heads remain unique in topological

Fixed regression where a revision file that contained its own down revision
as a dependency would cause an endless loop in the traversal logic.

Change-Id: Ie8bd3b4d9f81e4bda131ffdbabe7a90c4a715054
Fixes: #843
4 years agoUpdate black, zimports and flake8
CaselIT [Wed, 12 May 2021 20:16:22 +0000 (22:16 +0200)] 
Update black, zimports and flake8

Change-Id: Ia7d0ea7cc4389bc6adc4226efd5b18ecb68ffb2b

4 years agoFixed a bug where paths defined in post-write hook options
CaselIT [Tue, 11 May 2021 18:17:00 +0000 (20:17 +0200)] 
Fixed a bug where paths defined in post-write hook options
would be wrongly escaped in non posix environment (Windows).

Fixes: #841
Change-Id: Ife74d9291523378da113c259e3c173a8bc054e47

4 years agoMerge pull request #1 from dltacube/config.py-typo 840/head
Yoni Revah [Tue, 11 May 2021 02:56:02 +0000 (22:56 -0400)] 
Merge pull request #1 from dltacube/config.py-typo

Update config.py

4 years agoUpdate config.py
Yoni Revah [Tue, 11 May 2021 02:52:57 +0000 (22:52 -0400)] 
Update config.py

typo

4 years agoUpdate README.unittests.rst
Gord Thompson [Sun, 9 May 2021 13:29:53 +0000 (07:29 -0600)] 
Update README.unittests.rst

Change-Id: I3262688c4ceb6de48959e36c92b1c55b7c0a3ba6

4 years agoVersion 1.6.3 placeholder
Mike Bayer [Fri, 7 May 2021 02:35:16 +0000 (22:35 -0400)] 
Version 1.6.3 placeholder

4 years ago- 1.6.2 rel_1_6_2
Mike Bayer [Fri, 7 May 2021 02:31:55 +0000 (22:31 -0400)] 
- 1.6.2

4 years agochangelog / docstring edits
Mike Bayer [Fri, 7 May 2021 02:31:07 +0000 (22:31 -0400)] 
changelog / docstring edits

Change-Id: I89be3f965d3556694f497a47a6b13247ce2a1d94

4 years agoMove empty downgrade revisions check to make it specific to branch filtering case...
Simon Bowly [Fri, 7 May 2021 01:21:55 +0000 (11:21 +1000)] 
Move empty downgrade revisions check to make it specific to branch filtering case as intended.

Fixed regression in new versioning traversal where "alembic downgrade head" (or equivalent) fails instead of iterating no revisions.

Fixes: #839
Change-Id: I9e8463ee067761ee4588c2ccc1b1009e2be97c38

4 years agoVersion 1.6.2 placeholder
Mike Bayer [Thu, 6 May 2021 17:11:12 +0000 (13:11 -0400)] 
Version 1.6.2 placeholder

4 years ago- 1.6.1 rel_1_6_1
Mike Bayer [Thu, 6 May 2021 17:09:31 +0000 (13:09 -0400)] 
- 1.6.1

4 years agonarrow rangenotancestor to exclude target heads already present
Mike Bayer [Thu, 6 May 2021 16:51:30 +0000 (12:51 -0400)] 
narrow rangenotancestor to exclude target heads already present

Fixed regression in new revisioning traversal where "alembic downgrade
base" would fail if the database itself were clean and unversioned;
additionally repairs the case where downgrade would fail if attempting
to downgrade to the current head that is already present.

Change-Id: I581cab5a17f69d82e41eab147ceb27a38fe4ce1d
Fixes: #838
4 years agoVersion 1.6.1 placeholder
Mike Bayer [Mon, 3 May 2021 18:48:08 +0000 (14:48 -0400)] 
Version 1.6.1 placeholder

4 years ago- 1.6.0 rel_1_6_0
Mike Bayer [Mon, 3 May 2021 18:45:39 +0000 (14:45 -0400)] 
- 1.6.0

4 years agochangelog updates
Mike Bayer [Mon, 3 May 2021 18:41:42 +0000 (14:41 -0400)] 
changelog updates

Change-Id: I46ad62f13771e267cf53f6ae10fd0d5748fa8ccb

4 years agonext release is 1.6, forgot to update changelog
Mike Bayer [Mon, 3 May 2021 18:25:28 +0000 (14:25 -0400)] 
next release is 1.6, forgot to update changelog

Change-Id: I063338daaaae96333995b2af5103a9e32740882c

4 years agoMerge "implement table comments for batch"
mike bayer [Tue, 27 Apr 2021 17:15:04 +0000 (17:15 +0000)] 
Merge "implement table comments for batch"

4 years agoimplement table comments for batch
Mike Bayer [Tue, 27 Apr 2021 16:08:28 +0000 (12:08 -0400)] 
implement table comments for batch

Added missing ``batch_op.create_table_comment()``,
``batch_op.drop_table_comment()`` directives to batch ops.

Change-Id: Ia7779619d150a2fe26abb8a8cc89d147a8432f8c
Fixes: #799
4 years agoSort per-column comparisons in metadata order
Mike Bayer [Tue, 27 Apr 2021 15:14:26 +0000 (11:14 -0400)] 
Sort per-column comparisons in metadata order

Improved the rendering of ``op.add_column()`` operations when adding
multiple columns to an existing table, so that the order of these
statements matches the order in which the columns were declared in the
application's table metadata. Previously the added columns were being
sorted alphabetically.

Change-Id: Ia2a603c934ab101d102d63e715e92f9be9b747a7
Fixes: #827
4 years agoNew downgrade algorithm to fix branch behaviour
Simon Bowly [Wed, 3 Feb 2021 03:11:15 +0000 (22:11 -0500)] 
New downgrade algorithm to fix branch behaviour

The algorithm used for calculating downgrades/upgrades/iterating
revisions has been rewritten, to resolve ongoing issues of branches
not being handled consistently particularly within downgrade operations,
as well as for overall clarity and maintainability.  This change includes
that a deprecation warning is emitted if an ambiguous command such
as "downgrade -1" when multiple heads are present is given.

In particular, the change implements a long-requested use case of allowing
downgrades of a single branch to a branchpoint.

Huge thanks to Simon Bowly for their impressive efforts in successfully
tackling this very difficult problem.

Topological algorithm written by Mike which retains the
behavior of walking along a single branch as long as
possible before switching to another branch due to
cross-dependencies.

Fixes: #765
Fixes: #464
Fixes: #603
Fixes: #660
Closes: #790
Pull-request: https://github.com/sqlalchemy/alembic/pull/790
Pull-request-sha: 60752399336b883d26f38d61a8337dd6fdd48087

Change-Id: I8ab81d241df52a6bf0a474ccee35b16aecd706ac