diff options
| author | Barry Warsaw | 2012-12-29 23:31:50 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2012-12-29 23:31:50 -0500 |
| commit | 232dda432a0033f1857dbe4f1957ad29c498ba53 (patch) | |
| tree | c484f54ee6a01b4c447462d024cedc5357a77e66 /src/mailman/database | |
| parent | 582d6e486f9693a2ce082071b747eec468df19b6 (diff) | |
| download | mailman-232dda432a0033f1857dbe4f1957ad29c498ba53.tar.gz mailman-232dda432a0033f1857dbe4f1957ad29c498ba53.tar.zst mailman-232dda432a0033f1857dbe4f1957ad29c498ba53.zip | |
Revert the addition of the mailinglist.style_name column, as well as the
IMailingList.style_name attribute. The problem is, there's nothing to
guarantee that only one style will get run, and there's no sense in keeping
track of the last style applied.
Also:
* Remove ListManager.create()'s setting of .personalize and .display_name.
These should be left to the styles. (There's no reason why only these two
would be set here.)
* Fix some typos.
Diffstat (limited to 'src/mailman/database')
| -rw-r--r-- | src/mailman/database/schema/mm_20121015000000.py | 1 | ||||
| -rw-r--r-- | src/mailman/database/schema/sqlite_20121015000000_01.sql | 1 | ||||
| -rw-r--r-- | src/mailman/database/tests/test_migrations.py | 10 |
3 files changed, 1 insertions, 11 deletions
diff --git a/src/mailman/database/schema/mm_20121015000000.py b/src/mailman/database/schema/mm_20121015000000.py index bfbf5cb62..7ccf93289 100644 --- a/src/mailman/database/schema/mm_20121015000000.py +++ b/src/mailman/database/schema/mm_20121015000000.py @@ -87,6 +87,5 @@ 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 ADD COLUMN style_name;') # Record the migration in the version table. database.load_schema(store, version, None, module_path) diff --git a/src/mailman/database/schema/sqlite_20121015000000_01.sql b/src/mailman/database/schema/sqlite_20121015000000_01.sql index e9e3661e0..c0df75111 100644 --- a/src/mailman/database/schema/sqlite_20121015000000_01.sql +++ b/src/mailman/database/schema/sqlite_20121015000000_01.sql @@ -20,4 +20,3 @@ INSERT INTO ban_backup SELECT FROM ban; ALTER TABLE ban_backup ADD COLUMN list_id TEXT; -ALTER TABLE mailinglist ADD COLUMN style_name TEXT; diff --git a/src/mailman/database/tests/test_migrations.py b/src/mailman/database/tests/test_migrations.py index e813d4341..6d27f01f0 100644 --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -375,10 +375,6 @@ class TestMigration20121015Schema(MigrationTestBase): ['20121014999999'], ('list_id',), ('mailing_list',)) - self._missing_present('mailinglist', - ['20121014999999'], - ('style_name',), - ()) def test_post_upgrade_column_migrations(self): self._missing_present('ban', @@ -386,13 +382,9 @@ class TestMigration20121015Schema(MigrationTestBase): '20121015000000'], ('mailing_list',), ('list_id',)) - self._missing_present('mailinglist', - ['20121014999999', - '20121015000000'], - (), - ('style_name',)) + class TestMigration20121015MigratedData(MigrationTestBase): """Test non-migrated data.""" |
