Allow passing '--sql-analyser' to makemigrations command

This commit is contained in:
David Wobrock committed 2022-03-13 17:54:04 +01:00
1 parent c7d9129db9
commit c2ad3e6aeb
4 files changed
+15 -10

No files matched your search

@@ -1,5 +1,7 @@
import logging
from ..sql_analyser.analyser import ANALYSER_STRING_MAPPING
def register_linting_configuration_options(parser):
parser.add_argument(
@@ -27,6 +29,13 @@ def register_linting_configuration_options(parser):
"errors (e.g. RUNPYTHON_REVERSIBLE)",
)
parser.add_argument(
"--sql-analyser",
nargs="?",
choices=list(ANALYSER_STRING_MAPPING.keys()),
help="select the SQL analyser",
)
def configure_logging(verbosity):
logger = logging.getLogger("django_migration_linter")