alembic 1.13.1__tar.gz → 1.13.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {alembic-1.13.1 → alembic-1.13.2}/LICENSE +2 -2
- {alembic-1.13.1 → alembic-1.13.2}/PKG-INFO +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/alembic/__init__.py +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/alembic/autogenerate/api.py +3 -3
- {alembic-1.13.1 → alembic-1.13.2}/alembic/autogenerate/compare.py +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/alembic/autogenerate/render.py +25 -15
- {alembic-1.13.1 → alembic-1.13.2}/alembic/command.py +24 -15
- {alembic-1.13.1 → alembic-1.13.2}/alembic/config.py +5 -10
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/_autogen.py +15 -11
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/base.py +5 -4
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/impl.py +22 -17
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/mysql.py +49 -31
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/oracle.py +5 -3
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/postgresql.py +2 -1
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/base.py +5 -8
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/ops.py +5 -5
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/schemaobj.py +6 -4
- {alembic-1.13.1 → alembic-1.13.2}/alembic/runtime/environment.py +5 -7
- {alembic-1.13.1 → alembic-1.13.2}/alembic/runtime/migration.py +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/alembic/script/base.py +11 -9
- {alembic-1.13.1 → alembic-1.13.2}/alembic/script/revision.py +25 -18
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/async/alembic.ini.mako +3 -3
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/generic/alembic.ini.mako +2 -2
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/multidb/alembic.ini.mako +2 -2
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/fixtures.py +20 -8
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_autogen_computed.py +1 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_environment.py +3 -3
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/langhelpers.py +3 -6
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/messaging.py +9 -3
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/sqla_compat.py +2 -4
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/PKG-INFO +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/SOURCES.txt +1 -14
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/autogenerate.rst.txt +8 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/changelog.rst.txt +40 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/front.rst.txt +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/basic.css +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/doctools.js +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/documentation_options.js +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/language_data.js +2 -2
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/nature.css +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/searchtools.js +105 -60
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/autogenerate.html +10 -10
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/commands.html +32 -26
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/config.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/ddl.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/index.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/operations.html +11 -11
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/overview.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/runtime.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/api/script.html +10 -10
- {alembic-1.13.1 → alembic-1.13.2}/docs/autogenerate.html +18 -11
- {alembic-1.13.1 → alembic-1.13.2}/docs/batch.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/branches.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/autogenerate.rst +8 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/changelog.rst +40 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/conf.py +3 -3
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/front.rst +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/docs/changelog.html +52 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/cookbook.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/front.html +10 -10
- {alembic-1.13.1 → alembic-1.13.2}/docs/genindex.html +15 -11
- {alembic-1.13.1 → alembic-1.13.2}/docs/index.html +14 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/naming.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/offline.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/ops.html +14 -14
- {alembic-1.13.1 → alembic-1.13.2}/docs/py-modindex.html +9 -9
- {alembic-1.13.1 → alembic-1.13.2}/docs/search.html +11 -13
- alembic-1.13.2/docs/searchindex.js +1 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/tutorial.html +11 -11
- {alembic-1.13.1 → alembic-1.13.2}/pyproject.toml +3 -1
- {alembic-1.13.1 → alembic-1.13.2}/setup.cfg +2 -2
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_autogen_diffs.py +1 -98
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_autogen_indexes.py +5 -4
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_autogen_render.py +0 -1
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_batch.py +14 -12
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_command.py +7 -14
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_impl.py +27 -0
- alembic-1.13.2/tests/test_messaging.py +30 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_mssql.py +4 -3
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_postgresql.py +28 -16
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_script_production.py +1 -1
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_version_traversal.py +0 -2
- {alembic-1.13.1 → alembic-1.13.2}/tox.ini +4 -3
- alembic-1.13.1/.coveragerc +0 -5
- alembic-1.13.1/.github/FUNDING.yml +0 -6
- alembic-1.13.1/.github/ISSUE_TEMPLATE/bug_report.md +0 -41
- alembic-1.13.1/.github/ISSUE_TEMPLATE/config.yml +0 -15
- alembic-1.13.1/.github/ISSUE_TEMPLATE/use_case.md +0 -24
- alembic-1.13.1/.github/pull_request_template.md +0 -27
- alembic-1.13.1/.github/workflows/run-on-pr.yaml +0 -85
- alembic-1.13.1/.github/workflows/run-test.yaml +0 -100
- alembic-1.13.1/.gitignore +0 -24
- alembic-1.13.1/.gitreview +0 -6
- alembic-1.13.1/.pre-commit-config.yaml +0 -31
- alembic-1.13.1/docs/build/assets/api_overview.graffle +0 -2795
- alembic-1.13.1/docs/build/make.bat +0 -113
- alembic-1.13.1/docs/searchindex.js +0 -1
- alembic-1.13.1/reap_dbs.py +0 -25
- {alembic-1.13.1 → alembic-1.13.2}/CHANGES +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/MANIFEST.in +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/README.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/README.unittests.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/__main__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/autogenerate/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/autogenerate/rewriter.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/context.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/context.pyi +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/mssql.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/ddl/sqlite.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/environment.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/migration.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/op.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/op.pyi +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/batch.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/operations/toimpl.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/py.typed +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/runtime/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/script/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/script/write_hooks.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/async/README +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/async/env.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/async/script.py.mako +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/generic/README +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/generic/env.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/generic/script.py.mako +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/multidb/README +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/multidb/env.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/templates/multidb/script.py.mako +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/assertions.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/env.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/plugin/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/plugin/bootstrap.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/requirements.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/schemacompare.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/_autogen_fixtures.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_autogen_comments.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_autogen_diffs.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_autogen_fks.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_autogen_identity.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/suite/test_op.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/util.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/testing/warnings.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/compat.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/editor.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/exc.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic/util/pyfiles.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/dependency_links.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/entry_points.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/not-zip-safe +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/requires.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/alembic.egg-info/top_level.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_images/api_overview.png +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/autogenerate.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/commands.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/config.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/ddl.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/index.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/operations.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/overview.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/runtime.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/api/script.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/batch.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/branches.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/cookbook.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/index.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/naming.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/offline.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/ops.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_sources/tutorial.rst.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/changelog.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/clipboard.min.js +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/copybutton.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/copybutton.js +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/copybutton_funcs.js +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/file.png +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/minus.png +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/nature_override.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/plus.png +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/pygments.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/site_custom_css.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/sphinx_highlight.js +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/_static/sphinx_paramlinks.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/Makefile +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/_static/nature_override.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/_static/site_custom_css.css +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/_templates/site_custom_sidebars.html +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/api_overview.png +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/autogenerate.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/commands.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/config.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/ddl.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/index.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/operations.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/overview.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/runtime.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/api/script.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/batch.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/branches.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/cookbook.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/index.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/naming.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/offline.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/ops.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/requirements.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/tutorial.rst +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/docs/build/unreleased/README.txt +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/setup.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/__init__.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/_large_map.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/conftest.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/requirements.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_autogen_composition.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_bulk_insert.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_config.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_editor.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_environment.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_external_dialect.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_mysql.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_offline_environment.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_op.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_op_naming_convention.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_oracle.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_post_write.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_revision.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_script_consumption.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_sqlite.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_stubs.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_suite.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tests/test_version_table.py +0 -0
- {alembic-1.13.1 → alembic-1.13.2}/tools/write_pyi.py +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright 2009-
|
1
|
+
Copyright 2009-2024 Michael Bayer.
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
4
|
this software and associated documentation files (the "Software"), to deal in
|
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
16
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
18
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
-
SOFTWARE.
|
19
|
+
SOFTWARE.
|
@@ -596,9 +596,9 @@ class RevisionContext:
|
|
596
596
|
migration_script = self.generated_revisions[-1]
|
597
597
|
if not getattr(migration_script, "_needs_render", False):
|
598
598
|
migration_script.upgrade_ops_list[-1].upgrade_token = upgrade_token
|
599
|
-
migration_script.downgrade_ops_list[
|
600
|
-
|
601
|
-
|
599
|
+
migration_script.downgrade_ops_list[-1].downgrade_token = (
|
600
|
+
downgrade_token
|
601
|
+
)
|
602
602
|
migration_script._needs_render = True
|
603
603
|
else:
|
604
604
|
migration_script._upgrade_ops.append(
|
@@ -187,9 +187,11 @@ def _render_create_table_comment(
|
|
187
187
|
prefix=_alembic_autogenerate_prefix(autogen_context),
|
188
188
|
tname=op.table_name,
|
189
189
|
comment="%r" % op.comment if op.comment is not None else None,
|
190
|
-
existing=
|
191
|
-
|
192
|
-
|
190
|
+
existing=(
|
191
|
+
"%r" % op.existing_comment
|
192
|
+
if op.existing_comment is not None
|
193
|
+
else None
|
194
|
+
),
|
193
195
|
schema="'%s'" % op.schema if op.schema is not None else None,
|
194
196
|
indent=" ",
|
195
197
|
)
|
@@ -216,9 +218,11 @@ def _render_drop_table_comment(
|
|
216
218
|
return templ.format(
|
217
219
|
prefix=_alembic_autogenerate_prefix(autogen_context),
|
218
220
|
tname=op.table_name,
|
219
|
-
existing=
|
220
|
-
|
221
|
-
|
221
|
+
existing=(
|
222
|
+
"%r" % op.existing_comment
|
223
|
+
if op.existing_comment is not None
|
224
|
+
else None
|
225
|
+
),
|
222
226
|
schema="'%s'" % op.schema if op.schema is not None else None,
|
223
227
|
indent=" ",
|
224
228
|
)
|
@@ -328,9 +332,11 @@ def _add_index(autogen_context: AutogenContext, op: ops.CreateIndexOp) -> str:
|
|
328
332
|
_get_index_rendered_expressions(index, autogen_context)
|
329
333
|
),
|
330
334
|
"unique": index.unique or False,
|
331
|
-
"schema": (
|
332
|
-
|
333
|
-
|
335
|
+
"schema": (
|
336
|
+
(", schema=%r" % _ident(index.table.schema))
|
337
|
+
if index.table.schema
|
338
|
+
else ""
|
339
|
+
),
|
334
340
|
"kwargs": ", " + ", ".join(opts) if opts else "",
|
335
341
|
}
|
336
342
|
return text
|
@@ -592,9 +598,11 @@ def _get_index_rendered_expressions(
|
|
592
598
|
idx: Index, autogen_context: AutogenContext
|
593
599
|
) -> List[str]:
|
594
600
|
return [
|
595
|
-
|
596
|
-
|
597
|
-
|
601
|
+
(
|
602
|
+
repr(_ident(getattr(exp, "name", None)))
|
603
|
+
if isinstance(exp, sa_schema.Column)
|
604
|
+
else _render_potential_expr(exp, autogen_context, is_index=True)
|
605
|
+
)
|
598
606
|
for exp in idx.expressions
|
599
607
|
]
|
600
608
|
|
@@ -1075,9 +1083,11 @@ def _render_check_constraint(
|
|
1075
1083
|
)
|
1076
1084
|
return "%(prefix)sCheckConstraint(%(sqltext)s%(opts)s)" % {
|
1077
1085
|
"prefix": _sqlalchemy_autogenerate_prefix(autogen_context),
|
1078
|
-
"opts":
|
1079
|
-
|
1080
|
-
|
1086
|
+
"opts": (
|
1087
|
+
", " + (", ".join("%s=%s" % (k, v) for k, v in opts))
|
1088
|
+
if opts
|
1089
|
+
else ""
|
1090
|
+
),
|
1081
1091
|
"sqltext": _render_potential_expr(
|
1082
1092
|
constraint.sqltext, autogen_context, wrap_in_text=False
|
1083
1093
|
),
|
@@ -49,7 +49,7 @@ def init(
|
|
49
49
|
|
50
50
|
:param config: a :class:`.Config` object.
|
51
51
|
|
52
|
-
:param directory: string path of the target directory
|
52
|
+
:param directory: string path of the target directory.
|
53
53
|
|
54
54
|
:param template: string name of the migration environment template to
|
55
55
|
use.
|
@@ -174,7 +174,7 @@ def revision(
|
|
174
174
|
will be applied to the structure generated by the revision process
|
175
175
|
where it can be altered programmatically. Note that unlike all
|
176
176
|
the other parameters, this option is only available via programmatic
|
177
|
-
use of :func:`.command.revision
|
177
|
+
use of :func:`.command.revision`.
|
178
178
|
|
179
179
|
"""
|
180
180
|
|
@@ -315,9 +315,11 @@ def merge(
|
|
315
315
|
|
316
316
|
:param config: a :class:`.Config` instance
|
317
317
|
|
318
|
-
:param
|
318
|
+
:param revisions: The revisions to merge.
|
319
319
|
|
320
|
-
:param
|
320
|
+
:param message: string message to apply to the revision.
|
321
|
+
|
322
|
+
:param branch_label: string label name to apply to the new revision.
|
321
323
|
|
322
324
|
:param rev_id: hardcoded revision identifier instead of generating a new
|
323
325
|
one.
|
@@ -370,9 +372,10 @@ def upgrade(
|
|
370
372
|
|
371
373
|
:param config: a :class:`.Config` instance.
|
372
374
|
|
373
|
-
:param revision: string revision target or range for --sql mode
|
375
|
+
:param revision: string revision target or range for --sql mode. May be
|
376
|
+
``"heads"`` to target the most recent revision(s).
|
374
377
|
|
375
|
-
:param sql: if True, use ``--sql`` mode
|
378
|
+
:param sql: if True, use ``--sql`` mode.
|
376
379
|
|
377
380
|
:param tag: an arbitrary "tag" that can be intercepted by custom
|
378
381
|
``env.py`` scripts via the :meth:`.EnvironmentContext.get_tag_argument`
|
@@ -413,9 +416,10 @@ def downgrade(
|
|
413
416
|
|
414
417
|
:param config: a :class:`.Config` instance.
|
415
418
|
|
416
|
-
:param revision: string revision target or range for --sql mode
|
419
|
+
:param revision: string revision target or range for --sql mode. May
|
420
|
+
be ``"base"`` to target the first revision.
|
417
421
|
|
418
|
-
:param sql: if True, use ``--sql`` mode
|
422
|
+
:param sql: if True, use ``--sql`` mode.
|
419
423
|
|
420
424
|
:param tag: an arbitrary "tag" that can be intercepted by custom
|
421
425
|
``env.py`` scripts via the :meth:`.EnvironmentContext.get_tag_argument`
|
@@ -449,12 +453,13 @@ def downgrade(
|
|
449
453
|
script.run_env()
|
450
454
|
|
451
455
|
|
452
|
-
def show(config, rev):
|
456
|
+
def show(config: Config, rev: str) -> None:
|
453
457
|
"""Show the revision(s) denoted by the given symbol.
|
454
458
|
|
455
459
|
:param config: a :class:`.Config` instance.
|
456
460
|
|
457
|
-
:param
|
461
|
+
:param rev: string revision target. May be ``"current"`` to show the
|
462
|
+
revision(s) currently applied in the database.
|
458
463
|
|
459
464
|
"""
|
460
465
|
|
@@ -484,7 +489,7 @@ def history(
|
|
484
489
|
|
485
490
|
:param config: a :class:`.Config` instance.
|
486
491
|
|
487
|
-
:param rev_range: string revision range
|
492
|
+
:param rev_range: string revision range.
|
488
493
|
|
489
494
|
:param verbose: output in verbose mode.
|
490
495
|
|
@@ -543,7 +548,9 @@ def history(
|
|
543
548
|
_display_history(config, script, base, head)
|
544
549
|
|
545
550
|
|
546
|
-
def heads(
|
551
|
+
def heads(
|
552
|
+
config: Config, verbose: bool = False, resolve_dependencies: bool = False
|
553
|
+
) -> None:
|
547
554
|
"""Show current available heads in the script directory.
|
548
555
|
|
549
556
|
:param config: a :class:`.Config` instance.
|
@@ -568,7 +575,7 @@ def heads(config, verbose=False, resolve_dependencies=False):
|
|
568
575
|
)
|
569
576
|
|
570
577
|
|
571
|
-
def branches(config, verbose=False):
|
578
|
+
def branches(config: Config, verbose: bool = False) -> None:
|
572
579
|
"""Show current branch points.
|
573
580
|
|
574
581
|
:param config: a :class:`.Config` instance.
|
@@ -638,7 +645,9 @@ def stamp(
|
|
638
645
|
:param config: a :class:`.Config` instance.
|
639
646
|
|
640
647
|
:param revision: target revision or list of revisions. May be a list
|
641
|
-
to indicate stamping of multiple branch heads
|
648
|
+
to indicate stamping of multiple branch heads; may be ``"base"``
|
649
|
+
to remove all revisions from the table or ``"heads"`` to stamp the
|
650
|
+
most recent revision(s).
|
642
651
|
|
643
652
|
.. note:: this parameter is called "revisions" in the command line
|
644
653
|
interface.
|
@@ -728,7 +737,7 @@ def ensure_version(config: Config, sql: bool = False) -> None:
|
|
728
737
|
|
729
738
|
:param config: a :class:`.Config` instance.
|
730
739
|
|
731
|
-
:param sql: use ``--sql`` mode
|
740
|
+
:param sql: use ``--sql`` mode.
|
732
741
|
|
733
742
|
.. versionadded:: 1.7.6
|
734
743
|
|
@@ -221,8 +221,7 @@ class Config:
|
|
221
221
|
@overload
|
222
222
|
def get_section(
|
223
223
|
self, name: str, default: None = ...
|
224
|
-
) -> Optional[Dict[str, str]]:
|
225
|
-
...
|
224
|
+
) -> Optional[Dict[str, str]]: ...
|
226
225
|
|
227
226
|
# "default" here could also be a TypeVar
|
228
227
|
# _MT = TypeVar("_MT", bound=Mapping[str, str]),
|
@@ -230,14 +229,12 @@ class Config:
|
|
230
229
|
@overload
|
231
230
|
def get_section(
|
232
231
|
self, name: str, default: Dict[str, str]
|
233
|
-
) -> Dict[str, str]:
|
234
|
-
...
|
232
|
+
) -> Dict[str, str]: ...
|
235
233
|
|
236
234
|
@overload
|
237
235
|
def get_section(
|
238
236
|
self, name: str, default: Mapping[str, str]
|
239
|
-
) -> Union[Dict[str, str], Mapping[str, str]]:
|
240
|
-
...
|
237
|
+
) -> Union[Dict[str, str], Mapping[str, str]]: ...
|
241
238
|
|
242
239
|
def get_section(
|
243
240
|
self, name: str, default: Optional[Mapping[str, str]] = None
|
@@ -313,14 +310,12 @@ class Config:
|
|
313
310
|
return default
|
314
311
|
|
315
312
|
@overload
|
316
|
-
def get_main_option(self, name: str, default: str) -> str:
|
317
|
-
...
|
313
|
+
def get_main_option(self, name: str, default: str) -> str: ...
|
318
314
|
|
319
315
|
@overload
|
320
316
|
def get_main_option(
|
321
317
|
self, name: str, default: Optional[str] = None
|
322
|
-
) -> Optional[str]:
|
323
|
-
...
|
318
|
+
) -> Optional[str]: ...
|
324
319
|
|
325
320
|
def get_main_option(
|
326
321
|
self, name: str, default: Optional[str] = None
|
@@ -287,18 +287,22 @@ class _fk_constraint_sig(_constraint_sig[ForeignKeyConstraint]):
|
|
287
287
|
self.target_table,
|
288
288
|
tuple(self.target_columns),
|
289
289
|
) + (
|
290
|
-
(
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
290
|
+
(
|
291
|
+
(None if onupdate.lower() == "no action" else onupdate.lower())
|
292
|
+
if onupdate
|
293
|
+
else None
|
294
|
+
),
|
295
|
+
(
|
296
|
+
(None if ondelete.lower() == "no action" else ondelete.lower())
|
297
|
+
if ondelete
|
298
|
+
else None
|
299
|
+
),
|
296
300
|
# convert initially + deferrable into one three-state value
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
301
|
+
(
|
302
|
+
"initially_deferrable"
|
303
|
+
if initially and initially.lower() == "deferred"
|
304
|
+
else "deferrable" if deferrable else "not deferrable"
|
305
|
+
),
|
302
306
|
)
|
303
307
|
|
304
308
|
@util.memoized_property
|
@@ -40,7 +40,6 @@ _ServerDefault = Union["TextClause", "FetchedValue", "Function[Any]", str]
|
|
40
40
|
|
41
41
|
|
42
42
|
class AlterTable(DDLElement):
|
43
|
-
|
44
43
|
"""Represent an ALTER TABLE statement.
|
45
44
|
|
46
45
|
Only the string name and optional schema name of the table
|
@@ -238,9 +237,11 @@ def visit_column_default(
|
|
238
237
|
return "%s %s %s" % (
|
239
238
|
alter_table(compiler, element.table_name, element.schema),
|
240
239
|
alter_column(compiler, element.column_name),
|
241
|
-
|
242
|
-
|
243
|
-
|
240
|
+
(
|
241
|
+
"SET DEFAULT %s" % format_server_default(compiler, element.default)
|
242
|
+
if element.default is not None
|
243
|
+
else "DROP DEFAULT"
|
244
|
+
),
|
244
245
|
)
|
245
246
|
|
246
247
|
|
@@ -77,7 +77,6 @@ _impls: Dict[str, Type[DefaultImpl]] = {}
|
|
77
77
|
|
78
78
|
|
79
79
|
class DefaultImpl(metaclass=ImplMeta):
|
80
|
-
|
81
80
|
"""Provide the entrypoint for major migration operations,
|
82
81
|
including database-specific behavioral variances.
|
83
82
|
|
@@ -168,16 +167,15 @@ class DefaultImpl(metaclass=ImplMeta):
|
|
168
167
|
def _exec(
|
169
168
|
self,
|
170
169
|
construct: Union[Executable, str],
|
171
|
-
execution_options: Optional[
|
172
|
-
multiparams: Sequence[
|
173
|
-
params:
|
170
|
+
execution_options: Optional[Mapping[str, Any]] = None,
|
171
|
+
multiparams: Optional[Sequence[Mapping[str, Any]]] = None,
|
172
|
+
params: Mapping[str, Any] = util.immutabledict(),
|
174
173
|
) -> Optional[CursorResult]:
|
175
174
|
if isinstance(construct, str):
|
176
175
|
construct = text(construct)
|
177
176
|
if self.as_sql:
|
178
|
-
if multiparams or params:
|
179
|
-
|
180
|
-
raise Exception("Execution arguments not allowed with as_sql")
|
177
|
+
if multiparams is not None or params:
|
178
|
+
raise TypeError("SQL parameters not allowed with as_sql")
|
181
179
|
|
182
180
|
compile_kw: dict[str, Any]
|
183
181
|
if self.literal_binds and not isinstance(
|
@@ -200,11 +198,16 @@ class DefaultImpl(metaclass=ImplMeta):
|
|
200
198
|
assert conn is not None
|
201
199
|
if execution_options:
|
202
200
|
conn = conn.execution_options(**execution_options)
|
203
|
-
if params:
|
204
|
-
assert isinstance(multiparams, tuple)
|
205
|
-
multiparams += (params,)
|
206
201
|
|
207
|
-
|
202
|
+
if params and multiparams is not None:
|
203
|
+
raise TypeError(
|
204
|
+
"Can't send params and multiparams at the same time"
|
205
|
+
)
|
206
|
+
|
207
|
+
if multiparams:
|
208
|
+
return conn.execute(construct, multiparams)
|
209
|
+
else:
|
210
|
+
return conn.execute(construct, params)
|
208
211
|
|
209
212
|
def execute(
|
210
213
|
self,
|
@@ -421,13 +424,15 @@ class DefaultImpl(metaclass=ImplMeta):
|
|
421
424
|
self._exec(
|
422
425
|
sqla_compat._insert_inline(table).values(
|
423
426
|
**{
|
424
|
-
k:
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
427
|
+
k: (
|
428
|
+
sqla_compat._literal_bindparam(
|
429
|
+
k, v, type_=table.c[k].type
|
430
|
+
)
|
431
|
+
if not isinstance(
|
432
|
+
v, sqla_compat._literal_bindparam
|
433
|
+
)
|
434
|
+
else v
|
429
435
|
)
|
430
|
-
else v
|
431
436
|
for k, v in row.items()
|
432
437
|
}
|
433
438
|
)
|
@@ -94,21 +94,29 @@ class MySQLImpl(DefaultImpl):
|
|
94
94
|
column_name,
|
95
95
|
schema=schema,
|
96
96
|
newname=name if name is not None else column_name,
|
97
|
-
nullable=
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
97
|
+
nullable=(
|
98
|
+
nullable
|
99
|
+
if nullable is not None
|
100
|
+
else (
|
101
|
+
existing_nullable
|
102
|
+
if existing_nullable is not None
|
103
|
+
else True
|
104
|
+
)
|
105
|
+
),
|
102
106
|
type_=type_ if type_ is not None else existing_type,
|
103
|
-
default=
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
107
|
+
default=(
|
108
|
+
server_default
|
109
|
+
if server_default is not False
|
110
|
+
else existing_server_default
|
111
|
+
),
|
112
|
+
autoincrement=(
|
113
|
+
autoincrement
|
114
|
+
if autoincrement is not None
|
115
|
+
else existing_autoincrement
|
116
|
+
),
|
117
|
+
comment=(
|
118
|
+
comment if comment is not False else existing_comment
|
119
|
+
),
|
112
120
|
)
|
113
121
|
)
|
114
122
|
elif (
|
@@ -123,21 +131,29 @@ class MySQLImpl(DefaultImpl):
|
|
123
131
|
column_name,
|
124
132
|
schema=schema,
|
125
133
|
newname=name if name is not None else column_name,
|
126
|
-
nullable=
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
134
|
+
nullable=(
|
135
|
+
nullable
|
136
|
+
if nullable is not None
|
137
|
+
else (
|
138
|
+
existing_nullable
|
139
|
+
if existing_nullable is not None
|
140
|
+
else True
|
141
|
+
)
|
142
|
+
),
|
131
143
|
type_=type_ if type_ is not None else existing_type,
|
132
|
-
default=
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
144
|
+
default=(
|
145
|
+
server_default
|
146
|
+
if server_default is not False
|
147
|
+
else existing_server_default
|
148
|
+
),
|
149
|
+
autoincrement=(
|
150
|
+
autoincrement
|
151
|
+
if autoincrement is not None
|
152
|
+
else existing_autoincrement
|
153
|
+
),
|
154
|
+
comment=(
|
155
|
+
comment if comment is not False else existing_comment
|
156
|
+
),
|
141
157
|
)
|
142
158
|
)
|
143
159
|
elif server_default is not False:
|
@@ -368,9 +384,11 @@ def _mysql_alter_default(
|
|
368
384
|
return "%s ALTER COLUMN %s %s" % (
|
369
385
|
alter_table(compiler, element.table_name, element.schema),
|
370
386
|
format_column_name(compiler, element.column_name),
|
371
|
-
|
372
|
-
|
373
|
-
|
387
|
+
(
|
388
|
+
"SET DEFAULT %s" % format_server_default(compiler, element.default)
|
389
|
+
if element.default is not None
|
390
|
+
else "DROP DEFAULT"
|
391
|
+
),
|
374
392
|
)
|
375
393
|
|
376
394
|
|
@@ -141,9 +141,11 @@ def visit_column_default(
|
|
141
141
|
return "%s %s %s" % (
|
142
142
|
alter_table(compiler, element.table_name, element.schema),
|
143
143
|
alter_column(compiler, element.column_name),
|
144
|
-
|
145
|
-
|
146
|
-
|
144
|
+
(
|
145
|
+
"DEFAULT %s" % format_server_default(compiler, element.default)
|
146
|
+
if element.default is not None
|
147
|
+
else "DEFAULT NULL"
|
148
|
+
),
|
147
149
|
)
|
148
150
|
|
149
151
|
|
@@ -218,7 +218,8 @@ class PostgresqlImpl(DefaultImpl):
|
|
218
218
|
"join pg_class t on t.oid=d.refobjid "
|
219
219
|
"join pg_attribute a on a.attrelid=t.oid and "
|
220
220
|
"a.attnum=d.refobjsubid "
|
221
|
-
"where c.relkind='S' and
|
221
|
+
"where c.relkind='S' and "
|
222
|
+
"c.oid=cast(:seqname as regclass)"
|
222
223
|
),
|
223
224
|
seqname=seq_match.group(1),
|
224
225
|
).first()
|
@@ -406,8 +406,7 @@ class AbstractOperations(util.ModuleClsProxy):
|
|
406
406
|
return self.migration_context
|
407
407
|
|
408
408
|
@overload
|
409
|
-
def invoke(self, operation: CreateTableOp) -> Table:
|
410
|
-
...
|
409
|
+
def invoke(self, operation: CreateTableOp) -> Table: ...
|
411
410
|
|
412
411
|
@overload
|
413
412
|
def invoke(
|
@@ -427,12 +426,10 @@ class AbstractOperations(util.ModuleClsProxy):
|
|
427
426
|
DropTableOp,
|
428
427
|
ExecuteSQLOp,
|
429
428
|
],
|
430
|
-
) -> None:
|
431
|
-
...
|
429
|
+
) -> None: ...
|
432
430
|
|
433
431
|
@overload
|
434
|
-
def invoke(self, operation: MigrateOperation) -> Any:
|
435
|
-
...
|
432
|
+
def invoke(self, operation: MigrateOperation) -> Any: ...
|
436
433
|
|
437
434
|
def invoke(self, operation: MigrateOperation) -> Any:
|
438
435
|
"""Given a :class:`.MigrateOperation`, invoke it in terms of
|
@@ -1724,7 +1721,7 @@ class BatchOperations(AbstractOperations):
|
|
1724
1721
|
|
1725
1722
|
def create_foreign_key(
|
1726
1723
|
self,
|
1727
|
-
constraint_name: str,
|
1724
|
+
constraint_name: Optional[str],
|
1728
1725
|
referent_table: str,
|
1729
1726
|
local_cols: List[str],
|
1730
1727
|
remote_cols: List[str],
|
@@ -1774,7 +1771,7 @@ class BatchOperations(AbstractOperations):
|
|
1774
1771
|
...
|
1775
1772
|
|
1776
1773
|
def create_primary_key(
|
1777
|
-
self, constraint_name: str, columns: List[str]
|
1774
|
+
self, constraint_name: Optional[str], columns: List[str]
|
1778
1775
|
) -> None:
|
1779
1776
|
"""Issue a "create primary key" instruction using the
|
1780
1777
|
current batch migration context.
|
@@ -349,7 +349,7 @@ class CreatePrimaryKeyOp(AddConstraintOp):
|
|
349
349
|
def batch_create_primary_key(
|
350
350
|
cls,
|
351
351
|
operations: BatchOperations,
|
352
|
-
constraint_name: str,
|
352
|
+
constraint_name: Optional[str],
|
353
353
|
columns: List[str],
|
354
354
|
) -> None:
|
355
355
|
"""Issue a "create primary key" instruction using the
|
@@ -681,7 +681,7 @@ class CreateForeignKeyOp(AddConstraintOp):
|
|
681
681
|
def batch_create_foreign_key(
|
682
682
|
cls,
|
683
683
|
operations: BatchOperations,
|
684
|
-
constraint_name: str,
|
684
|
+
constraint_name: Optional[str],
|
685
685
|
referent_table: str,
|
686
686
|
local_cols: List[str],
|
687
687
|
remote_cols: List[str],
|
@@ -1371,9 +1371,9 @@ class DropTableOp(MigrateOperation):
|
|
1371
1371
|
info=self.info.copy() if self.info else {},
|
1372
1372
|
prefixes=list(self.prefixes) if self.prefixes else [],
|
1373
1373
|
schema=self.schema,
|
1374
|
-
_constraints_included=
|
1375
|
-
|
1376
|
-
|
1374
|
+
_constraints_included=(
|
1375
|
+
self._reverse._constraints_included if self._reverse else False
|
1376
|
+
),
|
1377
1377
|
**self.table_kw,
|
1378
1378
|
)
|
1379
1379
|
return t
|
@@ -223,10 +223,12 @@ class SchemaObjects:
|
|
223
223
|
t = sa_schema.Table(name, m, *cols, **kw)
|
224
224
|
|
225
225
|
constraints = [
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
226
|
+
(
|
227
|
+
sqla_compat._copy(elem, target_table=t)
|
228
|
+
if getattr(elem, "parent", None) is not t
|
229
|
+
and getattr(elem, "parent", None) is not None
|
230
|
+
else elem
|
231
|
+
)
|
230
232
|
for elem in columns
|
231
233
|
if isinstance(elem, (Constraint, Index))
|
232
234
|
]
|