alembic 1.16.2__tar.gz → 1.16.3__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.16.2/alembic.egg-info → alembic-1.16.3}/PKG-INFO +1 -1
- {alembic-1.16.2 → alembic-1.16.3}/alembic/__init__.py +1 -1
- {alembic-1.16.2 → alembic-1.16.3}/alembic/autogenerate/render.py +17 -4
- {alembic-1.16.2 → alembic-1.16.3}/alembic/script/write_hooks.py +42 -44
- {alembic-1.16.2/alembic/templates/generic → alembic-1.16.3/alembic/templates/async}/alembic.ini.mako +9 -3
- {alembic-1.16.2/alembic/templates/async → alembic-1.16.3/alembic/templates/generic}/alembic.ini.mako +9 -3
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/multidb/alembic.ini.mako +8 -2
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/pyproject/pyproject.toml.mako +9 -3
- alembic-1.16.3/alembic/templates/pyproject_async/README +1 -0
- alembic-1.16.3/alembic/templates/pyproject_async/alembic.ini.mako +44 -0
- alembic-1.16.3/alembic/templates/pyproject_async/env.py +89 -0
- alembic-1.16.3/alembic/templates/pyproject_async/pyproject.toml.mako +82 -0
- alembic-1.16.3/alembic/templates/pyproject_async/script.py.mako +28 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/sqla_compat.py +2 -4
- {alembic-1.16.2 → alembic-1.16.3/alembic.egg-info}/PKG-INFO +1 -1
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/SOURCES.txt +10 -0
- {alembic-1.16.2/docs/build → alembic-1.16.3/docs/_sources}/autogenerate.rst +13 -6
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/changelog.rst +42 -0
- {alembic-1.16.2/docs/build → alembic-1.16.3/docs/_sources}/cookbook.rst +2 -2
- {alembic-1.16.2/docs/build → alembic-1.16.3/docs/_sources}/tutorial.rst +8 -2
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/documentation_options.js +1 -1
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/autogenerate.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/commands.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/config.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/ddl.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/index.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/operations.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/overview.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/runtime.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/api/script.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/autogenerate.html +18 -10
- {alembic-1.16.2 → alembic-1.16.3}/docs/batch.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/branches.html +3 -3
- {alembic-1.16.2/docs/_sources → alembic-1.16.3/docs/build}/autogenerate.rst +13 -6
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/changelog.rst +42 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/conf.py +2 -2
- {alembic-1.16.2/docs/_sources → alembic-1.16.3/docs/build}/cookbook.rst +2 -2
- {alembic-1.16.2/docs/_sources → alembic-1.16.3/docs/build}/tutorial.rst +8 -2
- {alembic-1.16.2 → alembic-1.16.3}/docs/changelog.html +55 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/cookbook.html +5 -5
- {alembic-1.16.2 → alembic-1.16.3}/docs/front.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/genindex.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/index.html +8 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/naming.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/offline.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/ops.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/py-modindex.html +3 -3
- {alembic-1.16.2 → alembic-1.16.3}/docs/search.html +3 -3
- alembic-1.16.3/docs/searchindex.js +1 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/tutorial.html +11 -5
- {alembic-1.16.2 → alembic-1.16.3}/setup.cfg +1 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_autogen_render.py +35 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_mysql.py +18 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_post_write.py +191 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_script_production.py +101 -0
- {alembic-1.16.2 → alembic-1.16.3}/tox.ini +1 -1
- alembic-1.16.2/docs/searchindex.js +0 -1
- {alembic-1.16.2 → alembic-1.16.3}/CHANGES +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/LICENSE +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/MANIFEST.in +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/README.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/README.unittests.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/__main__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/autogenerate/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/autogenerate/api.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/autogenerate/compare.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/autogenerate/rewriter.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/command.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/config.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/context.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/context.pyi +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/_autogen.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/base.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/impl.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/mssql.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/mysql.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/oracle.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/postgresql.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/ddl/sqlite.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/environment.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/migration.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/op.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/op.pyi +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/base.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/batch.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/ops.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/schemaobj.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/operations/toimpl.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/py.typed +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/runtime/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/runtime/environment.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/runtime/migration.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/script/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/script/base.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/script/revision.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/async/README +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/async/env.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/async/script.py.mako +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/generic/README +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/generic/env.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/generic/script.py.mako +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/multidb/README +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/multidb/env.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/multidb/script.py.mako +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/pyproject/README +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/pyproject/alembic.ini.mako +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/pyproject/env.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/templates/pyproject/script.py.mako +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/assertions.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/env.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/fixtures.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/plugin/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/plugin/bootstrap.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/requirements.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/schemacompare.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/_autogen_fixtures.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_autogen_comments.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_autogen_computed.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_autogen_diffs.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_autogen_fks.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_autogen_identity.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_environment.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/suite/test_op.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/util.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/testing/warnings.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/compat.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/editor.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/exc.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/langhelpers.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/messaging.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic/util/pyfiles.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/dependency_links.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/entry_points.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/not-zip-safe +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/requires.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/alembic.egg-info/top_level.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_images/api_overview.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/autogenerate.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/commands.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/config.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/ddl.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/index.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/operations.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/overview.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/runtime.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/api/script.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/batch.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/branches.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/front.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/index.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/naming.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/offline.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_sources/ops.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/basic.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/changelog.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/clipboard.min.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/copybutton.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/copybutton.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/copybutton_funcs.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/doctools.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/file.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/images/logo_colab.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/language_data.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/minus.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/nature_override.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/plus.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/pygments.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/sbt-webpack-macros.html +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/scripts/bootstrap.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/scripts/bootstrap.js.LICENSE.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/scripts/pydata-sphinx-theme.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/scripts/sphinx-book-theme.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/searchtools.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/site_custom_css.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/sphinx_highlight.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/sphinx_paramlinks.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/styles/bootstrap.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/styles/pydata-sphinx-theme.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/styles/sphinx-book-theme.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/styles/theme.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/vendor/fontawesome/6.5.2/LICENSE.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/vendor/fontawesome/6.5.2/css/all.min.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/vendor/fontawesome/6.5.2/js/all.min.js.LICENSE.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/_static/webpack-macros.html +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/Makefile +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/_static/nature_override.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/_static/site_custom_css.css +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/_templates/site_custom_sidebars.html +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/api_overview.png +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/autogenerate.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/commands.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/config.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/ddl.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/index.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/operations.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/overview.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/runtime.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/api/script.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/batch.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/branches.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/front.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/index.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/naming.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/offline.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/ops.rst +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/requirements.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/docs/build/unreleased/README.txt +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/pyproject.toml +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/setup.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/__init__.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/_large_map.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/conftest.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/requirements.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_autogen_composition.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_autogen_diffs.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_autogen_indexes.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_batch.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_bulk_insert.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_command.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_config.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_editor.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_environment.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_external_dialect.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_impl.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_messaging.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_mssql.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_offline_environment.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_op.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_op_naming_convention.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_oracle.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_postgresql.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_revision.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_script_consumption.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_sqlite.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_stubs.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_suite.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_version_table.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tests/test_version_traversal.py +0 -0
- {alembic-1.16.2 → alembic-1.16.3}/tools/write_pyi.py +0 -0
@@ -813,6 +813,8 @@ def _render_server_default(
|
|
813
813
|
return _render_potential_expr(
|
814
814
|
default.arg, autogen_context, is_server_default=True
|
815
815
|
)
|
816
|
+
elif isinstance(default, sa_schema.FetchedValue):
|
817
|
+
return _render_fetched_value(autogen_context)
|
816
818
|
|
817
819
|
if isinstance(default, str) and repr_:
|
818
820
|
default = repr(re.sub(r"^'|'$", "", default))
|
@@ -850,6 +852,12 @@ def _render_identity(
|
|
850
852
|
}
|
851
853
|
|
852
854
|
|
855
|
+
def _render_fetched_value(autogen_context: AutogenContext) -> str:
|
856
|
+
return "%(prefix)sFetchedValue()" % {
|
857
|
+
"prefix": _sqlalchemy_autogenerate_prefix(autogen_context),
|
858
|
+
}
|
859
|
+
|
860
|
+
|
853
861
|
def _repr_type(
|
854
862
|
type_: TypeEngine,
|
855
863
|
autogen_context: AutogenContext,
|
@@ -1000,7 +1008,7 @@ def _render_primary_key(
|
|
1000
1008
|
def _fk_colspec(
|
1001
1009
|
fk: ForeignKey,
|
1002
1010
|
metadata_schema: Optional[str],
|
1003
|
-
namespace_metadata: MetaData,
|
1011
|
+
namespace_metadata: Optional[MetaData],
|
1004
1012
|
) -> str:
|
1005
1013
|
"""Implement a 'safe' version of ForeignKey._get_colspec() that
|
1006
1014
|
won't fail if the remote table can't be resolved.
|
@@ -1024,7 +1032,10 @@ def _fk_colspec(
|
|
1024
1032
|
# the FK constraint needs to be rendered in terms of the column
|
1025
1033
|
# name.
|
1026
1034
|
|
1027
|
-
if
|
1035
|
+
if (
|
1036
|
+
namespace_metadata is not None
|
1037
|
+
and table_fullname in namespace_metadata.tables
|
1038
|
+
):
|
1028
1039
|
col = namespace_metadata.tables[table_fullname].c.get(colname)
|
1029
1040
|
if col is not None:
|
1030
1041
|
colname = _ident(col.name) # type: ignore[assignment]
|
@@ -1055,7 +1066,7 @@ def _populate_render_fk_opts(
|
|
1055
1066
|
def _render_foreign_key(
|
1056
1067
|
constraint: ForeignKeyConstraint,
|
1057
1068
|
autogen_context: AutogenContext,
|
1058
|
-
namespace_metadata: MetaData,
|
1069
|
+
namespace_metadata: Optional[MetaData],
|
1059
1070
|
) -> Optional[str]:
|
1060
1071
|
rendered = _user_defined_render("foreign_key", constraint, autogen_context)
|
1061
1072
|
if rendered is not False:
|
@@ -1069,7 +1080,9 @@ def _render_foreign_key(
|
|
1069
1080
|
|
1070
1081
|
_populate_render_fk_opts(constraint, opts)
|
1071
1082
|
|
1072
|
-
apply_metadata_schema =
|
1083
|
+
apply_metadata_schema = (
|
1084
|
+
namespace_metadata.schema if namespace_metadata is not None else None
|
1085
|
+
)
|
1073
1086
|
return (
|
1074
1087
|
"%(prefix)sForeignKeyConstraint([%(cols)s], "
|
1075
1088
|
"[%(refcols)s], %(args)s)"
|
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
from __future__ import annotations
|
5
5
|
|
6
|
+
import importlib.util
|
6
7
|
import os
|
7
8
|
import shlex
|
8
9
|
import subprocess
|
@@ -112,17 +113,35 @@ def _parse_cmdline_options(cmdline_options_str: str, path: str) -> List[str]:
|
|
112
113
|
return cmdline_options_list
|
113
114
|
|
114
115
|
|
115
|
-
|
116
|
-
def console_scripts(
|
117
|
-
path: str, options: dict, ignore_output: bool = False
|
118
|
-
) -> None:
|
116
|
+
def _get_required_option(options: dict, name: str) -> str:
|
119
117
|
try:
|
120
|
-
|
118
|
+
return options[name]
|
121
119
|
except KeyError as ke:
|
122
120
|
raise util.CommandError(
|
123
|
-
f"Key {options['_hook_name']}.
|
121
|
+
f"Key {options['_hook_name']}.{name} is required for post "
|
124
122
|
f"write hook {options['_hook_name']!r}"
|
125
123
|
) from ke
|
124
|
+
|
125
|
+
|
126
|
+
def _run_hook(
|
127
|
+
path: str, options: dict, ignore_output: bool, command: List[str]
|
128
|
+
) -> None:
|
129
|
+
cwd: Optional[str] = options.get("cwd", None)
|
130
|
+
cmdline_options_str = options.get("options", "")
|
131
|
+
cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
|
132
|
+
|
133
|
+
kw: Dict[str, Any] = {}
|
134
|
+
if ignore_output:
|
135
|
+
kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
|
136
|
+
|
137
|
+
subprocess.run([*command, *cmdline_options_list], cwd=cwd, **kw)
|
138
|
+
|
139
|
+
|
140
|
+
@register("console_scripts")
|
141
|
+
def console_scripts(
|
142
|
+
path: str, options: dict, ignore_output: bool = False
|
143
|
+
) -> None:
|
144
|
+
entrypoint_name = _get_required_option(options, "entrypoint")
|
126
145
|
for entry in compat.importlib_metadata_get("console_scripts"):
|
127
146
|
if entry.name == entrypoint_name:
|
128
147
|
impl: Any = entry
|
@@ -131,48 +150,27 @@ def console_scripts(
|
|
131
150
|
raise util.CommandError(
|
132
151
|
f"Could not find entrypoint console_scripts.{entrypoint_name}"
|
133
152
|
)
|
134
|
-
cwd: Optional[str] = options.get("cwd", None)
|
135
|
-
cmdline_options_str = options.get("options", "")
|
136
|
-
cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
|
137
|
-
|
138
|
-
kw: Dict[str, Any] = {}
|
139
|
-
if ignore_output:
|
140
|
-
kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
|
141
153
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
+ cmdline_options_list,
|
149
|
-
cwd=cwd,
|
150
|
-
**kw,
|
151
|
-
)
|
154
|
+
command = [
|
155
|
+
sys.executable,
|
156
|
+
"-c",
|
157
|
+
f"import {impl.module}; {impl.module}.{impl.attr}()",
|
158
|
+
]
|
159
|
+
_run_hook(path, options, ignore_output, command)
|
152
160
|
|
153
161
|
|
154
162
|
@register("exec")
|
155
163
|
def exec_(path: str, options: dict, ignore_output: bool = False) -> None:
|
156
|
-
|
157
|
-
|
158
|
-
except KeyError as ke:
|
159
|
-
raise util.CommandError(
|
160
|
-
f"Key {options['_hook_name']}.executable is required for post "
|
161
|
-
f"write hook {options['_hook_name']!r}"
|
162
|
-
) from ke
|
163
|
-
cwd: Optional[str] = options.get("cwd", None)
|
164
|
-
cmdline_options_str = options.get("options", "")
|
165
|
-
cmdline_options_list = _parse_cmdline_options(cmdline_options_str, path)
|
164
|
+
executable = _get_required_option(options, "executable")
|
165
|
+
_run_hook(path, options, ignore_output, command=[executable])
|
166
166
|
|
167
|
-
kw: Dict[str, Any] = {}
|
168
|
-
if ignore_output:
|
169
|
-
kw["stdout"] = kw["stderr"] = subprocess.DEVNULL
|
170
167
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
168
|
+
@register("module")
|
169
|
+
def module(path: str, options: dict, ignore_output: bool = False) -> None:
|
170
|
+
module_name = _get_required_option(options, "module")
|
171
|
+
|
172
|
+
if importlib.util.find_spec(module_name) is None:
|
173
|
+
raise util.CommandError(f"Could not find module {module_name}")
|
174
|
+
|
175
|
+
command = [sys.executable, "-m", module_name]
|
176
|
+
_run_hook(path, options, ignore_output, command)
|
{alembic-1.16.2/alembic/templates/generic → alembic-1.16.3/alembic/templates/async}/alembic.ini.mako
RENAMED
@@ -18,7 +18,6 @@ script_location = ${script_location}
|
|
18
18
|
# is defined by "path_separator" below.
|
19
19
|
prepend_sys_path = .
|
20
20
|
|
21
|
-
|
22
21
|
# timezone to use when rendering the date within the migration file
|
23
22
|
# as well as the filename.
|
24
23
|
# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
|
@@ -72,6 +71,7 @@ prepend_sys_path = .
|
|
72
71
|
# Use os.pathsep. Default configuration used for new projects.
|
73
72
|
path_separator = os
|
74
73
|
|
74
|
+
|
75
75
|
# set to 'true' to search source files recursively
|
76
76
|
# in each "version_locations" directory
|
77
77
|
# new in Alembic version 1.10
|
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
|
|
98
98
|
# black.entrypoint = black
|
99
99
|
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
100
100
|
|
101
|
-
# lint with attempts to fix using "ruff" - use the
|
101
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
102
|
+
# hooks = ruff
|
103
|
+
# ruff.type = module
|
104
|
+
# ruff.module = ruff
|
105
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
106
|
+
|
107
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
102
108
|
# hooks = ruff
|
103
109
|
# ruff.type = exec
|
104
|
-
# ruff.executable =
|
110
|
+
# ruff.executable = ruff
|
105
111
|
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
106
112
|
|
107
113
|
# Logging configuration. This is also consumed by the user-maintained
|
{alembic-1.16.2/alembic/templates/async → alembic-1.16.3/alembic/templates/generic}/alembic.ini.mako
RENAMED
@@ -18,6 +18,7 @@ script_location = ${script_location}
|
|
18
18
|
# is defined by "path_separator" below.
|
19
19
|
prepend_sys_path = .
|
20
20
|
|
21
|
+
|
21
22
|
# timezone to use when rendering the date within the migration file
|
22
23
|
# as well as the filename.
|
23
24
|
# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
|
@@ -71,7 +72,6 @@ prepend_sys_path = .
|
|
71
72
|
# Use os.pathsep. Default configuration used for new projects.
|
72
73
|
path_separator = os
|
73
74
|
|
74
|
-
|
75
75
|
# set to 'true' to search source files recursively
|
76
76
|
# in each "version_locations" directory
|
77
77
|
# new in Alembic version 1.10
|
@@ -98,10 +98,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname
|
|
98
98
|
# black.entrypoint = black
|
99
99
|
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
100
100
|
|
101
|
-
# lint with attempts to fix using "ruff" - use the
|
101
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
102
|
+
# hooks = ruff
|
103
|
+
# ruff.type = module
|
104
|
+
# ruff.module = ruff
|
105
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
106
|
+
|
107
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
102
108
|
# hooks = ruff
|
103
109
|
# ruff.type = exec
|
104
|
-
# ruff.executable =
|
110
|
+
# ruff.executable = ruff
|
105
111
|
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
106
112
|
|
107
113
|
# Logging configuration. This is also consumed by the user-maintained
|
@@ -106,10 +106,16 @@ sqlalchemy.url = driver://user:pass@localhost/dbname2
|
|
106
106
|
# black.entrypoint = black
|
107
107
|
# black.options = -l 79 REVISION_SCRIPT_FILENAME
|
108
108
|
|
109
|
-
# lint with attempts to fix using "ruff" - use the
|
109
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
110
|
+
# hooks = ruff
|
111
|
+
# ruff.type = module
|
112
|
+
# ruff.module = ruff
|
113
|
+
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
114
|
+
|
115
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
110
116
|
# hooks = ruff
|
111
117
|
# ruff.type = exec
|
112
|
-
# ruff.executable =
|
118
|
+
# ruff.executable = ruff
|
113
119
|
# ruff.options = check --fix REVISION_SCRIPT_FILENAME
|
114
120
|
|
115
121
|
# Logging configuration. This is also consumed by the user-maintained
|
@@ -67,10 +67,16 @@ prepend_sys_path = [
|
|
67
67
|
# options = "-l 79 REVISION_SCRIPT_FILENAME"
|
68
68
|
#
|
69
69
|
# [[tool.alembic.post_write_hooks]]
|
70
|
-
# lint with attempts to fix using "ruff" - use the
|
71
|
-
#
|
70
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
71
|
+
# name = "ruff"
|
72
|
+
# type = "module"
|
73
|
+
# module = "ruff"
|
74
|
+
# options = "check --fix REVISION_SCRIPT_FILENAME"
|
75
|
+
#
|
76
|
+
# [[tool.alembic.post_write_hooks]]
|
77
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
72
78
|
# name = "ruff"
|
73
79
|
# type = "exec"
|
74
|
-
# executable = "
|
80
|
+
# executable = "ruff"
|
75
81
|
# options = "check --fix REVISION_SCRIPT_FILENAME"
|
76
82
|
|
@@ -0,0 +1 @@
|
|
1
|
+
pyproject configuration, with an async dbapi.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# A generic, single database configuration.
|
2
|
+
|
3
|
+
[alembic]
|
4
|
+
|
5
|
+
# database URL. This is consumed by the user-maintained env.py script only.
|
6
|
+
# other means of configuring database URLs may be customized within the env.py
|
7
|
+
# file.
|
8
|
+
sqlalchemy.url = driver://user:pass@localhost/dbname
|
9
|
+
|
10
|
+
|
11
|
+
# Logging configuration
|
12
|
+
[loggers]
|
13
|
+
keys = root,sqlalchemy,alembic
|
14
|
+
|
15
|
+
[handlers]
|
16
|
+
keys = console
|
17
|
+
|
18
|
+
[formatters]
|
19
|
+
keys = generic
|
20
|
+
|
21
|
+
[logger_root]
|
22
|
+
level = WARNING
|
23
|
+
handlers = console
|
24
|
+
qualname =
|
25
|
+
|
26
|
+
[logger_sqlalchemy]
|
27
|
+
level = WARNING
|
28
|
+
handlers =
|
29
|
+
qualname = sqlalchemy.engine
|
30
|
+
|
31
|
+
[logger_alembic]
|
32
|
+
level = INFO
|
33
|
+
handlers =
|
34
|
+
qualname = alembic
|
35
|
+
|
36
|
+
[handler_console]
|
37
|
+
class = StreamHandler
|
38
|
+
args = (sys.stderr,)
|
39
|
+
level = NOTSET
|
40
|
+
formatter = generic
|
41
|
+
|
42
|
+
[formatter_generic]
|
43
|
+
format = %(levelname)-5.5s [%(name)s] %(message)s
|
44
|
+
datefmt = %H:%M:%S
|
@@ -0,0 +1,89 @@
|
|
1
|
+
import asyncio
|
2
|
+
from logging.config import fileConfig
|
3
|
+
|
4
|
+
from sqlalchemy import pool
|
5
|
+
from sqlalchemy.engine import Connection
|
6
|
+
from sqlalchemy.ext.asyncio import async_engine_from_config
|
7
|
+
|
8
|
+
from alembic import context
|
9
|
+
|
10
|
+
# this is the Alembic Config object, which provides
|
11
|
+
# access to the values within the .ini file in use.
|
12
|
+
config = context.config
|
13
|
+
|
14
|
+
# Interpret the config file for Python logging.
|
15
|
+
# This line sets up loggers basically.
|
16
|
+
if config.config_file_name is not None:
|
17
|
+
fileConfig(config.config_file_name)
|
18
|
+
|
19
|
+
# add your model's MetaData object here
|
20
|
+
# for 'autogenerate' support
|
21
|
+
# from myapp import mymodel
|
22
|
+
# target_metadata = mymodel.Base.metadata
|
23
|
+
target_metadata = None
|
24
|
+
|
25
|
+
# other values from the config, defined by the needs of env.py,
|
26
|
+
# can be acquired:
|
27
|
+
# my_important_option = config.get_main_option("my_important_option")
|
28
|
+
# ... etc.
|
29
|
+
|
30
|
+
|
31
|
+
def run_migrations_offline() -> None:
|
32
|
+
"""Run migrations in 'offline' mode.
|
33
|
+
|
34
|
+
This configures the context with just a URL
|
35
|
+
and not an Engine, though an Engine is acceptable
|
36
|
+
here as well. By skipping the Engine creation
|
37
|
+
we don't even need a DBAPI to be available.
|
38
|
+
|
39
|
+
Calls to context.execute() here emit the given string to the
|
40
|
+
script output.
|
41
|
+
|
42
|
+
"""
|
43
|
+
url = config.get_main_option("sqlalchemy.url")
|
44
|
+
context.configure(
|
45
|
+
url=url,
|
46
|
+
target_metadata=target_metadata,
|
47
|
+
literal_binds=True,
|
48
|
+
dialect_opts={"paramstyle": "named"},
|
49
|
+
)
|
50
|
+
|
51
|
+
with context.begin_transaction():
|
52
|
+
context.run_migrations()
|
53
|
+
|
54
|
+
|
55
|
+
def do_run_migrations(connection: Connection) -> None:
|
56
|
+
context.configure(connection=connection, target_metadata=target_metadata)
|
57
|
+
|
58
|
+
with context.begin_transaction():
|
59
|
+
context.run_migrations()
|
60
|
+
|
61
|
+
|
62
|
+
async def run_async_migrations() -> None:
|
63
|
+
"""In this scenario we need to create an Engine
|
64
|
+
and associate a connection with the context.
|
65
|
+
|
66
|
+
"""
|
67
|
+
|
68
|
+
connectable = async_engine_from_config(
|
69
|
+
config.get_section(config.config_ini_section, {}),
|
70
|
+
prefix="sqlalchemy.",
|
71
|
+
poolclass=pool.NullPool,
|
72
|
+
)
|
73
|
+
|
74
|
+
async with connectable.connect() as connection:
|
75
|
+
await connection.run_sync(do_run_migrations)
|
76
|
+
|
77
|
+
await connectable.dispose()
|
78
|
+
|
79
|
+
|
80
|
+
def run_migrations_online() -> None:
|
81
|
+
"""Run migrations in 'online' mode."""
|
82
|
+
|
83
|
+
asyncio.run(run_async_migrations())
|
84
|
+
|
85
|
+
|
86
|
+
if context.is_offline_mode():
|
87
|
+
run_migrations_offline()
|
88
|
+
else:
|
89
|
+
run_migrations_online()
|
@@ -0,0 +1,82 @@
|
|
1
|
+
[tool.alembic]
|
2
|
+
|
3
|
+
# path to migration scripts.
|
4
|
+
# this is typically a path given in POSIX (e.g. forward slashes)
|
5
|
+
# format, relative to the token %(here)s which refers to the location of this
|
6
|
+
# ini file
|
7
|
+
script_location = "${script_location}"
|
8
|
+
|
9
|
+
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
10
|
+
# Uncomment the line below if you want the files to be prepended with date and time
|
11
|
+
# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
|
12
|
+
# for all available tokens
|
13
|
+
# file_template = "%%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s"
|
14
|
+
|
15
|
+
# additional paths to be prepended to sys.path. defaults to the current working directory.
|
16
|
+
prepend_sys_path = [
|
17
|
+
"."
|
18
|
+
]
|
19
|
+
|
20
|
+
# timezone to use when rendering the date within the migration file
|
21
|
+
# as well as the filename.
|
22
|
+
# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
|
23
|
+
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
|
24
|
+
# string value is passed to ZoneInfo()
|
25
|
+
# leave blank for localtime
|
26
|
+
# timezone =
|
27
|
+
|
28
|
+
# max length of characters to apply to the "slug" field
|
29
|
+
# truncate_slug_length = 40
|
30
|
+
|
31
|
+
# set to 'true' to run the environment during
|
32
|
+
# the 'revision' command, regardless of autogenerate
|
33
|
+
# revision_environment = false
|
34
|
+
|
35
|
+
# set to 'true' to allow .pyc and .pyo files without
|
36
|
+
# a source .py file to be detected as revisions in the
|
37
|
+
# versions/ directory
|
38
|
+
# sourceless = false
|
39
|
+
|
40
|
+
# version location specification; This defaults
|
41
|
+
# to <script_location>/versions. When using multiple version
|
42
|
+
# directories, initial revisions must be specified with --version-path.
|
43
|
+
# version_locations = [
|
44
|
+
# "%(here)s/alembic/versions",
|
45
|
+
# "%(here)s/foo/bar"
|
46
|
+
# ]
|
47
|
+
|
48
|
+
|
49
|
+
# set to 'true' to search source files recursively
|
50
|
+
# in each "version_locations" directory
|
51
|
+
# new in Alembic version 1.10
|
52
|
+
# recursive_version_locations = false
|
53
|
+
|
54
|
+
# the output encoding used when revision files
|
55
|
+
# are written from script.py.mako
|
56
|
+
# output_encoding = "utf-8"
|
57
|
+
|
58
|
+
# This section defines scripts or Python functions that are run
|
59
|
+
# on newly generated revision scripts. See the documentation for further
|
60
|
+
# detail and examples
|
61
|
+
# [[tool.alembic.post_write_hooks]]
|
62
|
+
# format using "black" - use the console_scripts runner,
|
63
|
+
# against the "black" entrypoint
|
64
|
+
# name = "black"
|
65
|
+
# type = "console_scripts"
|
66
|
+
# entrypoint = "black"
|
67
|
+
# options = "-l 79 REVISION_SCRIPT_FILENAME"
|
68
|
+
#
|
69
|
+
# [[tool.alembic.post_write_hooks]]
|
70
|
+
# lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
|
71
|
+
# name = "ruff"
|
72
|
+
# type = "module"
|
73
|
+
# module = "ruff"
|
74
|
+
# options = "check --fix REVISION_SCRIPT_FILENAME"
|
75
|
+
#
|
76
|
+
# [[tool.alembic.post_write_hooks]]
|
77
|
+
# Alternatively, use the exec runner to execute a binary found on your PATH
|
78
|
+
# name = "ruff"
|
79
|
+
# type = "exec"
|
80
|
+
# executable = "ruff"
|
81
|
+
# options = "check --fix REVISION_SCRIPT_FILENAME"
|
82
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"""${message}
|
2
|
+
|
3
|
+
Revision ID: ${up_revision}
|
4
|
+
Revises: ${down_revision | comma,n}
|
5
|
+
Create Date: ${create_date}
|
6
|
+
|
7
|
+
"""
|
8
|
+
from typing import Sequence, Union
|
9
|
+
|
10
|
+
from alembic import op
|
11
|
+
import sqlalchemy as sa
|
12
|
+
${imports if imports else ""}
|
13
|
+
|
14
|
+
# revision identifiers, used by Alembic.
|
15
|
+
revision: str = ${repr(up_revision)}
|
16
|
+
down_revision: Union[str, Sequence[str], None] = ${repr(down_revision)}
|
17
|
+
branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
|
18
|
+
depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
|
19
|
+
|
20
|
+
|
21
|
+
def upgrade() -> None:
|
22
|
+
"""Upgrade schema."""
|
23
|
+
${upgrades if upgrades else "pass"}
|
24
|
+
|
25
|
+
|
26
|
+
def downgrade() -> None:
|
27
|
+
"""Downgrade schema."""
|
28
|
+
${downgrades if downgrades else "pass"}
|
@@ -31,12 +31,10 @@ from sqlalchemy.sql.elements import BindParameter
|
|
31
31
|
from sqlalchemy.sql.elements import ColumnClause
|
32
32
|
from sqlalchemy.sql.elements import TextClause
|
33
33
|
from sqlalchemy.sql.elements import UnaryExpression
|
34
|
+
from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME # type: ignore[attr-defined] # noqa: E501
|
34
35
|
from sqlalchemy.sql.visitors import traverse
|
35
36
|
from typing_extensions import TypeGuard
|
36
37
|
|
37
|
-
if True:
|
38
|
-
from sqlalchemy.sql.naming import _NONE_NAME as _NONE_NAME # type: ignore[attr-defined] # noqa: E501
|
39
|
-
|
40
38
|
if TYPE_CHECKING:
|
41
39
|
from sqlalchemy import ClauseElement
|
42
40
|
from sqlalchemy import Identity
|
@@ -81,7 +79,7 @@ if TYPE_CHECKING:
|
|
81
79
|
) -> Callable[[_CompilerProtocol], _CompilerProtocol]: ...
|
82
80
|
|
83
81
|
else:
|
84
|
-
from sqlalchemy.ext.compiler import compiles
|
82
|
+
from sqlalchemy.ext.compiler import compiles # noqa: I100,I202
|
85
83
|
|
86
84
|
|
87
85
|
identity_has_dialect_kwargs = issubclass(schema.Identity, DialectKWArgs)
|
@@ -62,6 +62,11 @@ tox.ini
|
|
62
62
|
./alembic/templates/pyproject/env.py
|
63
63
|
./alembic/templates/pyproject/pyproject.toml.mako
|
64
64
|
./alembic/templates/pyproject/script.py.mako
|
65
|
+
./alembic/templates/pyproject_async/README
|
66
|
+
./alembic/templates/pyproject_async/alembic.ini.mako
|
67
|
+
./alembic/templates/pyproject_async/env.py
|
68
|
+
./alembic/templates/pyproject_async/pyproject.toml.mako
|
69
|
+
./alembic/templates/pyproject_async/script.py.mako
|
65
70
|
./alembic/testing/__init__.py
|
66
71
|
./alembic/testing/assertions.py
|
67
72
|
./alembic/testing/env.py
|
@@ -151,6 +156,11 @@ alembic/templates/pyproject/alembic.ini.mako
|
|
151
156
|
alembic/templates/pyproject/env.py
|
152
157
|
alembic/templates/pyproject/pyproject.toml.mako
|
153
158
|
alembic/templates/pyproject/script.py.mako
|
159
|
+
alembic/templates/pyproject_async/README
|
160
|
+
alembic/templates/pyproject_async/alembic.ini.mako
|
161
|
+
alembic/templates/pyproject_async/env.py
|
162
|
+
alembic/templates/pyproject_async/pyproject.toml.mako
|
163
|
+
alembic/templates/pyproject_async/script.py.mako
|
154
164
|
alembic/testing/__init__.py
|
155
165
|
alembic/testing/assertions.py
|
156
166
|
alembic/testing/env.py
|
@@ -721,15 +721,22 @@ Above, we configure ``hooks`` to be a single post write hook labeled
|
|
721
721
|
configuration for the ``"black"`` post write hook, which includes:
|
722
722
|
|
723
723
|
* ``type`` - this is the type of hook we are running. Alembic includes
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
724
|
+
three hook runners:
|
725
|
+
|
726
|
+
* ``"console_scripts"``, which is specifically a Python function that uses
|
727
|
+
``subprocess.run()`` to invoke a separate Python script against the revision file;
|
728
|
+
* ``"exec"``, which uses ``subprocess.run()`` to execute an arbitrary binary; and
|
729
|
+
* ``"module"``, which uses ``subprocess.run()`` to invoke a Python module directly.
|
730
|
+
|
731
|
+
For a custom-written hook function, this configuration variable would
|
732
|
+
refer to the name under which the custom hook was registered; see the
|
733
|
+
next section for an example.
|
730
734
|
|
731
735
|
.. versionadded:: 1.12 added new ``exec`` runner
|
732
736
|
|
737
|
+
.. versionadded:: 1.16.3 added new ``module`` runner
|
738
|
+
|
739
|
+
|
733
740
|
The following configuration option is specific to the ``"console_scripts"``
|
734
741
|
hook runner:
|
735
742
|
|