summaryrefslogtreecommitdiff
path: root/src/mailman/database/schema
Commit message (Collapse)AuthorAgeFilesLines
* Migrations will be replaced with Alchemy.Barry Warsaw2014-09-2211-1682/+0
| | | | | | We don't need the raw SQL schema stuff any more. We don't need the Version table any more.
* Bump copyright years.Barry Warsaw2014-01-015-5/+5
|
* Checkpointing.Barry Warsaw2013-11-251-2/+18
|
* Only do the cleanup if we're not using SQLite.Barry Warsaw2013-10-241-1/+0
|
* trunk mergeBarry Warsaw2013-09-011-3/+3
|\
| * Switch to PEP 435 enums from flufl.enums.Barry Warsaw2013-06-181-3/+3
| |
* | Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-017-48/+175
|/ | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* Bump copyright years.Barry Warsaw2013-01-013-3/+3
|
* Remove mailinglist.admin_member_chunksize.Barry Warsaw2012-12-302-3/+4
|
* Remove mailinglist.private_roster.Barry Warsaw2012-12-302-2/+5
|
* Remove unused columns mailinglist.subscribe_policy,Barry Warsaw2012-12-302-6/+4
| | | | mailinglist.unsubscribe_policy, mailinglist.subscribe_auto_approval.
* Remove mailinglist.send_reminders column too.Barry Warsaw2012-12-302-5/+7
|
* * The column `mailinglist.new_member_options` was unused, and has beenBarry Warsaw2012-12-303-2/+220
| | | | removed.
* Revert the addition of the mailinglist.style_name column, as well as theBarry Warsaw2012-12-292-2/+0
| | | | | | | | | | | | 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.
* LP: #975692 phase 1Barry Warsaw2012-12-282-0/+5
| | | | | | | | | | | | | | | | | * Rework list style management. No more style priorities or matching.. Now, you name a style explicitly to apply and that's it. * create_list() now takes a `style` argument. * config file now names both a default style to use, and a set of paths to scan for IStyle instances. (This could be a model for other plugins.) * added IMailingList.style_name to record the last style applied, but this is going to be removed in subsequent revisions. Also: * Move find_components() and scan_module() from app/finder.py to utilities/modules.py * Cleaned up lifecycle.rst for better documentation. Some tests moved to test_lifecycle.py. * Remove some unnecessary test tearDown() code.
* DatabaseBarry Warsaw2012-10-164-2/+112
| | | | | | | | | | | | -------- * 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. Interfaces ---------- * The `IBanManager` is no longer a global utility. Instead, you adapt an `IMailingList` to an `IBanManager` to manage the bans for a specific mailing list. To manage the global bans, adapt ``None``.
* Port the schema migration changes for LP: #1024509 to PostgreSQL.Barry Warsaw2012-09-051-6/+36
|
* * Schema migrations (LP: #1024509)Barry Warsaw2012-09-042-3/+45
| | | | - member.mailing_list -> list_id
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-042-27/+60
| | | | | | | | | | | | | | | now via the RFC 2369 `list_id` instead of the fqdn listname (i.e. posting address). This is because while the posting address can change if the mailing list is moved to a new server, the list id is fixed. (LP: #1024509) + IListManager.get_by_list_id() added. + IListManager.list_ids added. + IMailingList.list_id added. + Several internal APIs that accepted fqdn list names now require list ids, e.g. ISubscriptionService.join() and .find_members(). + IMember.list_id attribute added; .mailing_list is now an alias that retrieves and returns the IMailingList. - list_id added (LP: #1024509)
* A few fixes for schema migration on PostgreSQL.Barry Warsaw2012-08-201-3/+8
| | | | | | | | | - migration.rst needs special cleanup since the Version table is no longer wiped by the test machinery. This only caused failures when running the migration.rst test multiple times, and only on PostgreSQL. - Complete the removal of archive_volume_frequency and generic_nonmember_action for PostgreSQL. - Remove setting archive_volume_frequency in the default style.
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-192-4/+4
| | | | (LP: #975696)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-265-22/+390
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ArchivePolicy. This describes the three states of never archive, archive privately, and archive_publicly. (LP: #967238) Database -------- * Schema migrations (LP: #971013) - include_list_post_header -> allow_list_posts - news_prefix_subject_too -> nntp_prefix_subject_too - news_moderation -> newsgroup_moderation - archive and archive_private have been collapsed into archive_policy. - nntp_host has been removed. * The PostgreSQL port of the schema accidentally added a moderation_callback column to the mailinglist table. Since this is unused in Mailman, it was simply commented out of the base schema for PostgreSQL.
| * And now, working for PostgreSQL.Barry Warsaw2012-07-251-0/+3
| |
| * Working for SQLite:Barry Warsaw2012-07-252-10/+20
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-252-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | production database. - Add an IDatabaseFactory interface with two named utility implementations. The initialization subsystem will either ask for the 'testing' or 'production' factory utility depending on whether we're in the test suite or not. The testing factory returns an IDatabase that can be _reset(). - initialize_2() now takes an optional `testing` argument, defaulting to False. The test ConfigLayer will pass in True. - Remove _reset() from the base database class. - The ModelMeta now adds a PRESERVE attribute to database classes. This defaults to False, meaning by default the test framework will reset the table. The Version table is preserved because it records the schema migrations. - Because of the above, we no longer need to support pre_reset() and post_reset() on migrations. Also, bin/mailman should allow the standard configuration file search algorithm to be used except when -C/--config is given.
| * Very nearly there with PostgreSQL support for testing the beta2 migration.Barry Warsaw2012-07-252-12/+14
| | | | | | | | | | | | | | | | | | - Improve migration logging - Disable pre_reset() and post_reset() on migrations, which might need to be re-enabled for SQLite support. - Be sure to record the migration version in PostgreSQL. - Parameterize the Error that will occur. - Better sample data for PostgreSQL and SQLite, which have different formats.
| * Checkpointing Postgres port of test suite.Barry Warsaw2012-07-232-19/+70
| | | | | | | | | | | | | | | | | | - Refactor load_schema() into a separate load_sql() method. - Add API for test suite to make a temporary database. - Add code to migrate the PostgreSQL database. - Comment out `moderation_callback` from the PostgreSQL SQL; this must have snuck in accidentally via the contributed port. - Refactor test_migrations.py
| * Get test suite completely working:Barry Warsaw2012-07-202-14/+25
| | | | | | | | | | | | | | - migrations.rst needs to handle new standard migration - Add ResetHelper() to refactor out common migration test cooperation. - Handle temporary database. - Fix some attribute names.
| * newsgroup_moderationBarry Warsaw2012-04-081-1/+1
| |
| * - Rename the model attributes.Barry Warsaw2012-04-082-8/+11
| | | | | | | | - news_moderation -> newsgroup_moderation
| * - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-083-0/+314
|/ | | | | | | | | | | | | | | can be tested separately. - Add an `until` argument to load_migrations() so that we can load only up to a given timestamp. - In load_migrations(), ignore files in which the `version` part of the file name is empty. - In migrations.rst, use the new, better way of ensuring post-test cleanup. - Add tests for partial upgrades. - LP: #971013 - schema migrations for beta 2. - LP: #967238 - IMailingList.archive + IMailingList.archive_private -> IMailingList.archive_policy, and add ArchivePolicy enum. - Move the `chdir` context manager to helpers.py and add `temporary_db` context manager.
* Add an owner chain and pipeline to the schema, model, and interface. PlumbBarry Warsaw2012-03-222-0/+4
| | | | this through the incoming runner.
* Merge the Pipermail eradication branch. The scrubber is also removed.Barry Warsaw2012-03-172-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
| * * Pipermail has been eradicated.Barry Warsaw2012-03-162-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
* | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-152-6/+6
|/ | | | | | | | | | | "display_name" across the board. * `IMailingList.real_name` -> `IMailingList.display_name` * `IUser.real_name` -> `IUser.display_name` * `IAddress.real_name` -> `IAddress.display_name` * Schema changes: - real_name -> display_name (mailinglist, user, address)
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-072-4/+4
| | | | | | | | | | | postings go through the `posting_chain` while messages to owners to through `owners_chain`. The default `built-in` chain is renamed to `default-posting-chain` while the `built-in` pipeline is renamed `default-posting-pipeline`. * Schema changes: - start_chain -> posting_chain - pipeline -> posting_pipeline
* Reserve the mm_ prefix for MailmanBarry Warsaw2012-03-051-0/+0
|
* Template indirection now also in effect for regular and digest headers andBarry Warsaw2012-03-042-8/+8
| | | | | | | | | | | | footers, using the same semantics and algorithm as for welcome and goodbye messages. Additional schema changes: - msg_header -> header_uri - msg_footer -> footer_uri - digest_header -> digest_header_uri - digest_footer -> digest_footer_uri
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-032-8/+8
| | | | | | | | | | | | | used in welcome and goodbye messages, and supports both language and mailing list specifications. E.g. mailman:///test@example.com/it/welc.txt * Schema changes: - welcome_msg -> welcome_message_uri - goodbye_msg -> goodbye_message_uri - send_welcome_msg -> send_welcome_message - send_goodbye_msg -> send_goodbye_message * New `ITemplateLoader` utility.
* * Schema migrations have been implemented.Barry Warsaw2012-02-124-0/+721