summaryrefslogtreecommitdiff
path: root/src/mailman/database/tests/test_migrations.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Port the schema migration changes for LP: #1024509 to PostgreSQL.Barry Warsaw2012-09-051-0/+1
|
* * Schema migrations (LP: #1024509)Barry Warsaw2012-09-041-0/+21
| | | | - member.mailing_list -> list_id
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-041-0/+10
| | | | | | | | | | | | | | | 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)
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-191-0/+2
| | | | (LP: #975696)
* Working for SQLite:Barry Warsaw2012-07-251-6/+85
| | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
* Add a temporary database factory so we can remove more cruft from theBarry Warsaw2012-07-251-15/+11
| | | | | | | | | individual database classes themselves. This does mean that the temporary factory must know something special about the sqlite and postgresql databases, but I think that's an acceptable trade-off. This should make the test code cleaner, and allow me to write better support for temporary PostgreSQL databases.
* A few more tweaks to get PostgreSQL working.Barry Warsaw2012-07-251-3/+4
| | | | | - store.rollback() is better than store.execute('ABORT;') - We need to do a commit after the migrations are loaded.
* One more refactoring.Barry Warsaw2012-07-251-11/+11
|
* Refactor once again for SQLite/PostgreSQL differences.Barry Warsaw2012-07-251-65/+28
|
* No need to parameterize the exceptions, since Storm does this for us.Barry Warsaw2012-07-251-2/+3
|
* Very nearly there with PostgreSQL support for testing the beta2 migration.Barry Warsaw2012-07-251-39/+35
| | | | | | | | | - 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-231-70/+199
| | | | | | | | | - 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
* Add a few more tests.Barry Warsaw2012-07-201-1/+18
|
* Get test suite completely working:Barry Warsaw2012-07-201-14/+15
| | | | | | | - migrations.rst needs to handle new standard migration - Add ResetHelper() to refactor out common migration test cooperation. - Handle temporary database. - Fix some attribute names.
* Separate out the migration test methods so that the ones testing that theBarry Warsaw2012-04-201-20/+36
| | | | | | | | columns got renamed don't in fact check the data in those tables. Better separation of concerns. Rename mailman.database.transaction.txn to ...transactional and use it in a couple of additional spots.
* newsgroup_moderationBarry Warsaw2012-04-081-0/+7
|
* - Rename the model attributes.Barry Warsaw2012-04-081-7/+3
| | | | - news_moderation -> newsgroup_moderation
* - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-0/+133
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.