summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mailman/commands/cli_migrate.py2
-rw-r--r--src/mailman/config/alembic.cfg (renamed from src/mailman/config/alembic.ini)2
-rw-r--r--src/mailman/config/schema.cfg2
-rw-r--r--src/mailman/database/base.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mailman/commands/cli_migrate.py b/src/mailman/commands/cli_migrate.py
index 8783b5c46..ca9d5e9d4 100644
--- a/src/mailman/commands/cli_migrate.py
+++ b/src/mailman/commands/cli_migrate.py
@@ -48,7 +48,7 @@ class Migrate:
'-a', '--autogenerate',
action='store_true', help=_("""\
Autogenerate the migration script using Alembic."""))
- command.parser_add_argument(
+ command_parser.add_argument(
'-q', '--quiet',
action='store_true', default=False,
help=('Produce less output.'))
diff --git a/src/mailman/config/alembic.ini b/src/mailman/config/alembic.cfg
index a7247743c..46ac90b61 100644
--- a/src/mailman/config/alembic.ini
+++ b/src/mailman/config/alembic.cfg
@@ -2,7 +2,7 @@
[alembic]
# path to migration scripts
-script_location = src/mailman/database/alembic
+script_location = mailman.database:alembic
# template used to generate migration files
# file_template = %%(rev)s_%%(slug)s
diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg
index f66c0b5b5..e8f89ab41 100644
--- a/src/mailman/config/schema.cfg
+++ b/src/mailman/config/schema.cfg
@@ -206,7 +206,7 @@ debug: no
# Where can we find the Alembic migration scripts? The `python:` schema means
# that this is a module path relative to the Mailman 3 source installation.
-alembic_scripts: python:mailman.database.alembic
+alembic_scripts: mailman.database:alembic
[logging.template]
diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py
index e49d512c0..4c418c289 100644
--- a/src/mailman/database/base.py
+++ b/src/mailman/database/base.py
@@ -100,7 +100,7 @@ class SABaseDatabase:
# alembic_version table.
alembic_cfg = Config()
alembic_cfg.set_main_option(
- 'script_location', expand_path(config.database['alembic_scripts']))
+ 'script_location', config.database['alembic_scripts'])
command.stamp(alembic_cfg, 'head')