summaryrefslogtreecommitdiff
path: root/src/mailman/database
diff options
context:
space:
mode:
authorBarry Warsaw2012-08-19 18:58:55 -0400
committerBarry Warsaw2012-08-19 18:58:55 -0400
commit9eb9875569a716dd82ee7764ecee2f37ab446e13 (patch)
tree3298a0e3c0c65b55535c3223ef80ed6dc1296ed4 /src/mailman/database
parentb301eeb71249ef58ffcc8b285d51b19c8b42812b (diff)
downloadmailman-9eb9875569a716dd82ee7764ecee2f37ab446e13.tar.gz
mailman-9eb9875569a716dd82ee7764ecee2f37ab446e13.tar.zst
mailman-9eb9875569a716dd82ee7764ecee2f37ab446e13.zip
* Removed obsolete `IMailingList` attribute `generic_nonmember_action.
(LP: #975696)
Diffstat (limited to 'src/mailman/database')
-rw-r--r--src/mailman/database/base.py1
-rw-r--r--src/mailman/database/schema/mm_20120407000000.py6
-rw-r--r--src/mailman/database/schema/sqlite_20120407000000_01.sql2
-rw-r--r--src/mailman/database/tests/test_migrations.py2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/mailman/database/base.py b/src/mailman/database/base.py
index 41d9374f9..694ad9ec3 100644
--- a/src/mailman/database/base.py
+++ b/src/mailman/database/base.py
@@ -189,6 +189,7 @@ class StormBaseDatabase:
continue
log.debug('migrating db to %s: %s', version, module_path)
upgrade(self, self.store, version, module_path)
+ self.commit()
def load_sql(self, store, sql):
"""Load the given SQL into the store.
diff --git a/src/mailman/database/schema/mm_20120407000000.py b/src/mailman/database/schema/mm_20120407000000.py
index df192b2ae..89bc52eca 100644
--- a/src/mailman/database/schema/mm_20120407000000.py
+++ b/src/mailman/database/schema/mm_20120407000000.py
@@ -27,6 +27,7 @@ All column changes are in the `mailinglist` table.
- archive, archive_private -> archive_policy
* Remove:
+ - generic_nonmember_action
- nntp_host
See https://bugs.launchpad.net/mailman/+bug/971013 for details.
@@ -130,7 +131,8 @@ def upgrade_postgres(database, store, version, module_path):
archive_policy(archive, archive_private),
id))
# Now drop the old columns.
- store.execute('ALTER TABLE mailinglist DROP COLUMN archive;')
- store.execute('ALTER TABLE mailinglist DROP COLUMN archive_private;')
+ for column in ('archive', 'archive_private', 'generic_nonmember_action'):
+ store.execute(
+ 'ALTER TABLE mailinglist DROP COLUMN {0};'.format(column))
# Record the migration in the version table.
database.load_schema(store, version, None, module_path)
diff --git a/src/mailman/database/schema/sqlite_20120407000000_01.sql b/src/mailman/database/schema/sqlite_20120407000000_01.sql
index e5d3a39ff..a4eb0adce 100644
--- a/src/mailman/database/schema/sqlite_20120407000000_01.sql
+++ b/src/mailman/database/schema/sqlite_20120407000000_01.sql
@@ -87,7 +87,6 @@ CREATE TABLE ml_backup(
forward_auto_discards BOOLEAN,
gateway_to_mail BOOLEAN,
gateway_to_news BOOLEAN,
- generic_nonmember_action INTEGER,
goodbye_message_uri TEXT,
header_matches BLOB,
header_uri TEXT,
@@ -197,7 +196,6 @@ INSERT INTO ml_backup SELECT
forward_auto_discards,
gateway_to_mail,
gateway_to_news,
- generic_nonmember_action,
goodbye_message_uri,
header_matches,
header_uri,
diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py
index 6ad648623..c69a8c545 100644
--- a/src/mailman/database/tests/test_migrations.py
+++ b/src/mailman/database/tests/test_migrations.py
@@ -91,6 +91,7 @@ class TestMigration20120407Schema(MigrationTestBase):
for present in ('archive',
'archive_private',
'archive_volume_frequency',
+ 'generic_nonmember_action',
'include_list_post_header',
'news_moderation',
'news_prefix_subject_too',
@@ -118,6 +119,7 @@ class TestMigration20120407Schema(MigrationTestBase):
for missing in ('archive',
'archive_private',
'archive_volume_frequency',
+ 'generic_nonmember_action',
'include_list_post_header',
'news_moderation',
'news_prefix_subject_too',