diff options
| author | Barry Warsaw | 2012-12-30 11:59:05 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2012-12-30 11:59:05 -0500 |
| commit | fc662999d425e9347f59f676861ee44ad81c2623 (patch) | |
| tree | a6ba8fceb36aecc6fb2b66c5b946589b188057a2 | |
| parent | 08c8644c4bcd067f1501829a39ee9f06d116abf3 (diff) | |
| download | mailman-fc662999d425e9347f59f676861ee44ad81c2623.tar.gz mailman-fc662999d425e9347f59f676861ee44ad81c2623.tar.zst mailman-fc662999d425e9347f59f676861ee44ad81c2623.zip | |
| -rw-r--r-- | src/mailman/database/schema/mm_20121015000000.py | 6 | ||||
| -rw-r--r-- | src/mailman/database/schema/sqlite_20120407000000_01.sql | 2 | ||||
| -rw-r--r-- | src/mailman/database/schema/sqlite_20121015000000_01.sql | 214 | ||||
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 9 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.rst | 2 | ||||
| -rw-r--r-- | src/mailman/model/mailinglist.py | 2 | ||||
| -rw-r--r-- | src/mailman/styles/default.py | 1 |
7 files changed, 231 insertions, 5 deletions
diff --git a/src/mailman/database/schema/mm_20121015000000.py b/src/mailman/database/schema/mm_20121015000000.py index 7ccf93289..3e7b12555 100644 --- a/src/mailman/database/schema/mm_20121015000000.py +++ b/src/mailman/database/schema/mm_20121015000000.py @@ -68,9 +68,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;') @@ -87,5 +90,6 @@ 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;') # 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 53bab70dd..5eacc4047 100644 --- a/src/mailman/database/schema/sqlite_20120407000000_01.sql +++ b/src/mailman/database/schema/sqlite_20120407000000_01.sql @@ -34,7 +34,7 @@ -- LP: #1024509 -CREATE TABLE ml_backup( +CREATE TABLE ml_backup ( id INTEGER NOT NULL, -- List identity list_name TEXT, diff --git a/src/mailman/database/schema/sqlite_20121015000000_01.sql b/src/mailman/database/schema/sqlite_20121015000000_01.sql index c0df75111..d25f7c52a 100644 --- a/src/mailman/database/schema/sqlite_20121015000000_01.sql +++ b/src/mailman/database/schema/sqlite_20121015000000_01.sql @@ -20,3 +20,217 @@ INSERT INTO ban_backup SELECT FROM ban; ALTER TABLE ban_backup ADD COLUMN list_id TEXT; + +-- REMOVALS from the mailinglist table. +-- REM new_member_options + +CREATE TABLE ml_backup ( + id INTEGER NOT NULL, + list_name TEXT, + mail_host TEXT, + allow_list_posts BOOLEAN, + include_rfc2369_headers BOOLEAN, + created_at TIMESTAMP, + admin_member_chunksize INTEGER, + next_request_id INTEGER, + next_digest_number INTEGER, + digest_last_sent_at TIMESTAMP, + volume INTEGER, + last_post_at TIMESTAMP, + accept_these_nonmembers BLOB, + acceptable_aliases_id INTEGER, + admin_immed_notify BOOLEAN, + admin_notify_mchanges BOOLEAN, + administrivia BOOLEAN, + advertised BOOLEAN, + anonymous_list BOOLEAN, + autorespond_owner INTEGER, + autoresponse_owner_text TEXT, + autorespond_postings INTEGER, + autoresponse_postings_text TEXT, + autorespond_requests INTEGER, + autoresponse_request_text TEXT, + autoresponse_grace_period TEXT, + forward_unrecognized_bounces_to INTEGER, + process_bounces BOOLEAN, + bounce_info_stale_after TEXT, + bounce_matching_headers TEXT, + bounce_notify_owner_on_disable BOOLEAN, + bounce_notify_owner_on_removal BOOLEAN, + bounce_score_threshold INTEGER, + bounce_you_are_disabled_warnings INTEGER, + bounce_you_are_disabled_warnings_interval TEXT, + filter_action INTEGER, + filter_content BOOLEAN, + collapse_alternatives BOOLEAN, + convert_html_to_plaintext BOOLEAN, + default_member_action INTEGER, + default_nonmember_action INTEGER, + description TEXT, + digest_footer_uri TEXT, + digest_header_uri TEXT, + digest_is_default BOOLEAN, + digest_send_periodic BOOLEAN, + digest_size_threshold FLOAT, + digest_volume_frequency INTEGER, + digestable BOOLEAN, + discard_these_nonmembers BLOB, + emergency BOOLEAN, + encode_ascii_prefixes BOOLEAN, + first_strip_reply_to BOOLEAN, + footer_uri TEXT, + forward_auto_discards BOOLEAN, + gateway_to_mail BOOLEAN, + gateway_to_news BOOLEAN, + goodbye_message_uri TEXT, + header_matches BLOB, + header_uri TEXT, + hold_these_nonmembers BLOB, + info TEXT, + linked_newsgroup TEXT, + max_days_to_hold INTEGER, + max_message_size INTEGER, + max_num_recipients INTEGER, + member_moderation_notice TEXT, + mime_is_default_digest BOOLEAN, + moderator_password TEXT, + nondigestable BOOLEAN, + nonmember_rejection_notice TEXT, + obscure_addresses BOOLEAN, + owner_chain TEXT, + owner_pipeline TEXT, + personalize INTEGER, + post_id INTEGER, + posting_chain TEXT, + posting_pipeline TEXT, + preferred_language TEXT, + private_roster BOOLEAN, + display_name TEXT, + reject_these_nonmembers BLOB, + reply_goes_to_list INTEGER, + reply_to_address TEXT, + require_explicit_destination BOOLEAN, + respond_to_post_requests BOOLEAN, + scrub_nondigest BOOLEAN, + send_goodbye_message BOOLEAN, + send_reminders BOOLEAN, + send_welcome_message BOOLEAN, + subject_prefix TEXT, + subscribe_auto_approval BLOB, + subscribe_policy INTEGER, + topics BLOB, + topics_bodylines_limit INTEGER, + topics_enabled BOOLEAN, + unsubscribe_policy INTEGER, + welcome_message_uri TEXT, + archive_policy INTEGER, + list_id TEXT, + nntp_prefix_subject_too INTEGER, + newsgroup_moderation INTEGER, + PRIMARY KEY (id) + ); + +INSERT INTO ml_backup SELECT + id, + list_name, + mail_host, + allow_list_posts, + include_rfc2369_headers, + created_at, + admin_member_chunksize, + next_request_id, + next_digest_number, + digest_last_sent_at, + volume, + last_post_at, + accept_these_nonmembers, + acceptable_aliases_id, + admin_immed_notify, + admin_notify_mchanges, + administrivia, + advertised, + anonymous_list, + autorespond_owner, + autoresponse_owner_text, + autorespond_postings, + autoresponse_postings_text, + autorespond_requests, + autoresponse_request_text, + autoresponse_grace_period, + forward_unrecognized_bounces_to, + process_bounces, + bounce_info_stale_after, + bounce_matching_headers, + bounce_notify_owner_on_disable, + bounce_notify_owner_on_removal, + bounce_score_threshold, + bounce_you_are_disabled_warnings, + bounce_you_are_disabled_warnings_interval, + filter_action, + filter_content, + collapse_alternatives, + convert_html_to_plaintext, + default_member_action, + default_nonmember_action, + description, + digest_footer_uri, + digest_header_uri, + digest_is_default, + digest_send_periodic, + digest_size_threshold, + digest_volume_frequency, + digestable, + discard_these_nonmembers, + emergency, + encode_ascii_prefixes, + first_strip_reply_to, + footer_uri, + forward_auto_discards, + gateway_to_mail, + gateway_to_news, + goodbye_message_uri, + header_matches, + header_uri, + hold_these_nonmembers, + info, + linked_newsgroup, + max_days_to_hold, + max_message_size, + max_num_recipients, + member_moderation_notice, + mime_is_default_digest, + moderator_password, + nondigestable, + nonmember_rejection_notice, + obscure_addresses, + owner_chain, + owner_pipeline, + personalize, + post_id, + posting_chain, + posting_pipeline, + preferred_language, + private_roster, + display_name, + reject_these_nonmembers, + reply_goes_to_list, + reply_to_address, + require_explicit_destination, + respond_to_post_requests, + scrub_nondigest, + send_goodbye_message, + send_reminders, + send_welcome_message, + subject_prefix, + subscribe_auto_approval, + subscribe_policy, + topics, + topics_bodylines_limit, + topics_enabled, + unsubscribe_policy, + welcome_message_uri, + archive_policy, + list_id, + nntp_prefix_subject_too, + newsgroup_moderation + FROM mailinglist; diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index 6d27f01f0..f47ad6d3c 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -375,6 +375,10 @@ class TestMigration20121015Schema(MigrationTestBase): ['20121014999999'], ('list_id',), ('mailing_list',)) + self._missing_present('mailinglist', + ['20121014999999'], + (), + ('new_member_options',)) def test_post_upgrade_column_migrations(self): self._missing_present('ban', @@ -382,6 +386,11 @@ class TestMigration20121015Schema(MigrationTestBase): '20121015000000'], ('mailing_list',), ('list_id',)) + self._missing_present('mailinglist', + ['20121014999999', + '20121015000000'], + ('new_member_options',), + ()) diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst index a9a238f3c..082bc7f12 100644 --- a/src/mailman/docs/NEWS.rst +++ b/src/mailman/docs/NEWS.rst @@ -73,6 +73,8 @@ Database -------- * The `ban` table now uses list-ids to cross-reference the mailing list, since these cannot change even if the mailing list is moved or renamed. + * The column `mailinglist.new_member_options` was unused, and has been + removed. Interfaces ---------- diff --git a/src/mailman/model/mailinglist.py b/src/mailman/model/mailinglist.py index 1987bc0e1..344cc7f8e 100644 --- a/src/mailman/model/mailinglist.py +++ b/src/mailman/model/mailinglist.py @@ -26,7 +26,6 @@ __all__ = [ import os -import string from storm.locals import ( And, Bool, DateTime, Float, Int, Pickle, RawStr, Reference, Store, @@ -163,7 +162,6 @@ class MailingList(Model): member_moderation_notice = Unicode() mime_is_default_digest = Bool() moderator_password = RawStr() - new_member_options = Int() newsgroup_moderation = Enum(NewsgroupModeration) nntp_prefix_subject_too = Bool() nondigestable = Bool() diff --git a/src/mailman/styles/default.py b/src/mailman/styles/default.py index af0151c71..6e4fc71b5 100644 --- a/src/mailman/styles/default.py +++ b/src/mailman/styles/default.py @@ -59,7 +59,6 @@ class DefaultStyle: # Most of these were ripped from the old MailList.InitVars() method. mlist.volume = 1 mlist.post_id = 1 - mlist.new_member_options = 256 mlist.respond_to_post_requests = True mlist.advertised = True mlist.max_num_recipients = 10 |
