From e08c121dbea14d42329a86facb0b710916eb1321 Mon Sep 17 00:00:00 2001 From: Jay Miller Date: Thu, 30 Nov 2023 11:49:58 -0500 Subject: [PATCH 1/2] Update env.py --- .../src/flask/flaskapp/migrations/env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py b/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py index b409dce..f363acd 100644 --- a/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py +++ b/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py @@ -88,7 +88,7 @@ def process_revision_directives(context, revision, directives): connection=connection, target_metadata=get_metadata(), process_revision_directives=process_revision_directives, - **current_app.extensions["migrate"].configure_args + **current_app.extensions["migrate"].configure_args, ) with context.begin_transaction(): From 51ef6464875b16d9bc640f2aa907f2f7e9e9737c Mon Sep 17 00:00:00 2001 From: Jay Miller Date: Thu, 30 Nov 2023 12:34:51 -0500 Subject: [PATCH 2/2] option 2 --- {{cookiecutter.__src_folder_name}}/pyproject.toml | 2 +- .../src/flask/flaskapp/migrations/env.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.__src_folder_name}}/pyproject.toml b/{{cookiecutter.__src_folder_name}}/pyproject.toml index 4a60ec3..a385def 100644 --- a/{{cookiecutter.__src_folder_name}}/pyproject.toml +++ b/{{cookiecutter.__src_folder_name}}/pyproject.toml @@ -2,7 +2,7 @@ line-length = 120 select = ["E", "F", "I", "UP"] ignore = ["D203"] -extend-exclude = ["flaskapp/migrations/"] +extend-exclude = ["src/flaskapp/migrations/"] [tool.ruff.isort] {% if cookiecutter.project_backend == "flask" %} diff --git a/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py b/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py index f363acd..b409dce 100644 --- a/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py +++ b/{{cookiecutter.__src_folder_name}}/src/flask/flaskapp/migrations/env.py @@ -88,7 +88,7 @@ def process_revision_directives(context, revision, directives): connection=connection, target_metadata=get_metadata(), process_revision_directives=process_revision_directives, - **current_app.extensions["migrate"].configure_args, + **current_app.extensions["migrate"].configure_args ) with context.begin_transaction():