diff options
Diffstat (limited to 'src/mailman/database/schema/mm_20121015000000.py')
| -rw-r--r-- | src/mailman/database/schema/mm_20121015000000.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mailman/database/schema/mm_20121015000000.py b/src/mailman/database/schema/mm_20121015000000.py index 51e0602e7..dc688d33b 100644 --- a/src/mailman/database/schema/mm_20121015000000.py +++ b/src/mailman/database/schema/mm_20121015000000.py @@ -17,7 +17,12 @@ """3.0b2 -> 3.0b3 schema migrations. -* bans.mailing_list -> bans.list_id +Renamed: + * bans.mailing_list -> bans.list_id + +Removed: + * mailinglist.new_member_options + * mailinglist.send_remindersn """ from __future__ import absolute_import, print_function, unicode_literals @@ -65,9 +70,12 @@ def upgrade_sqlite(database, store, version, module_path): UPDATE ban_backup SET list_id = '{0}' WHERE id = {1}; """.format(_make_listid(mailing_list), id)) - # Pivot the backup table to the real thing. + # Pivot the bans backup table to the real thing. store.execute('DROP TABLE ban;') store.execute('ALTER TABLE ban_backup RENAME TO ban;') + # Pivot the mailinglist backup table to the real thing. + store.execute('DROP TABLE mailinglist;') + store.execute('ALTER TABLE ml_backup RENAME TO mailinglist;') @@ -84,5 +92,14 @@ def upgrade_postgres(database, store, version, module_path): WHERE id = {1}; """.format(_make_listid(mailing_list), id)) store.execute('ALTER TABLE ban DROP COLUMN mailing_list;') + store.execute('ALTER TABLE mailinglist DROP COLUMN new_member_options;') + store.execute('ALTER TABLE mailinglist DROP COLUMN send_reminders;') + store.execute('ALTER TABLE mailinglist DROP COLUMN subscribe_policy;') + store.execute('ALTER TABLE mailinglist DROP COLUMN unsubscribe_policy;') + store.execute( + 'ALTER TABLE mailinglist DROP COLUMN subscribe_auto_approval;') + store.execute('ALTER TABLE mailinglist DROP COLUMN private_roster;') + store.execute( + 'ALTER TABLE mailinglist DROP COLUMN admin_member_chunksize;') # Record the migration in the version table. database.load_schema(store, version, None, module_path) |
