summaryrefslogtreecommitdiff
path: root/src/mailman/database
diff options
context:
space:
mode:
authorAurélien Bompard2015-09-11 14:15:28 +0200
committerBarry Warsaw2015-10-20 21:10:34 -0400
commit583a7639eb78dc52cf899076fef777e303101567 (patch)
treeaf67e76b305ff79c9d5425ebff178113fdba9153 /src/mailman/database
parent741fdc63a4415cad6226e886b761eb87c3be8256 (diff)
downloadmailman-583a7639eb78dc52cf899076fef777e303101567.tar.gz
mailman-583a7639eb78dc52cf899076fef777e303101567.tar.zst
mailman-583a7639eb78dc52cf899076fef777e303101567.zip
Rename from plural to singular
Diffstat (limited to 'src/mailman/database')
-rw-r--r--src/mailman/database/alembic/versions/42756496720_header_matches.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/database/alembic/versions/42756496720_header_matches.py b/src/mailman/database/alembic/versions/42756496720_header_matches.py
index 3dd896993..ae3463286 100644
--- a/src/mailman/database/alembic/versions/42756496720_header_matches.py
+++ b/src/mailman/database/alembic/versions/42756496720_header_matches.py
@@ -16,7 +16,7 @@ import sqlalchemy as sa
def upgrade():
# Create the new table
- header_matches_table = op.create_table('headermatches',
+ header_match_table = op.create_table('headermatch',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('mailing_list_id', sa.Integer(), nullable=True),
sa.Column('header', sa.Unicode(), nullable=True),
@@ -37,7 +37,7 @@ def upgrade():
)
for mlist_id, old_matches in connection.execute(mlist_table.select()):
for old_match in old_matches:
- connection.execute(header_matches_table.insert().values(
+ connection.execute(header_match_table.insert().values(
mailing_list_id=mlist_id,
header=old_match[0],
pattern=old_match[1],
@@ -66,17 +66,17 @@ def downgrade():
sa.sql.column('id', sa.Integer),
sa.sql.column('header_matches', sa.PickleType)
)
- header_matches_table = sa.sql.table('headermatches',
+ header_match_table = sa.sql.table('headermatch',
sa.sql.column('mailing_list_id', sa.Integer),
sa.sql.column('header', sa.Unicode),
sa.sql.column('pattern', sa.Unicode),
)
for mlist_id, header, pattern in connection.execute(
- header_matches_table.select()):
+ header_match_table.select()):
mlist = connection.execute(mlist_table.select().where(
mlist_table.c.id == mlist_id)).fetchone()
if not mlist["header_matches"]:
mlist["header_matches"] = []
mlist["header_matches"].append((header, pattern))
- op.drop_table('headermatches')
+ op.drop_table('headermatch')