summaryrefslogtreecommitdiff
path: root/src/mailman/database
Commit message (Collapse)AuthorAgeFilesLines
...
| * Clean up pass.Barry Warsaw2014-09-225-61/+42
| |
| * Test repair:Barry Warsaw2014-09-212-1/+8
| | | | | | | | | | | | | | | | * Remove an unused import. * Add skips for all migration unit tests. * Fix model class attribute typo. * .values() returns tuples, so adjust for that. * Add a test.
| * * remove some unused codeAbhilash Raj2014-09-192-48/+26
| | | | | | | | | | | | | | * add left out documentation * remov super(<class>).__init__() calls in models as it was useless now. * remove schema_migrate func in mailman/database/base.py
| * * fix the circular dependecy problem between User and AdressAbhilash Raj2014-09-192-15/+1
| | | | | | | | * fix almost all the errors relating to doctests
| * reset database by purging all data instead of dropping schema and recreating itAbhilash Raj2014-09-181-9/+10
| |
| * all tests except for importer working(ignoring test_migrations.py)Abhilash Raj2014-09-183-42/+18
| |
| * fix all tests in mailman.model.testsAbhilash Raj2014-09-131-1/+5
| |
| * modify all storm queries to work with SAAbhilash Raj2014-09-123-54/+66
| |
| * * change declarative_base class to use ModelMeta classAbhilash Raj2014-09-066-106/+21
| | | | | | | | * update some queries to match SA style
| * add new UUID typeAbhilash Raj2014-09-051-23/+85
| |
| * change models to use sqlalchemy models<WIP>Abhilash Raj2014-09-041-1/+4
| |
| * add new database base model for sqlalchemyAbhilash Raj2014-09-041-0/+38
|/
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-282-13/+13
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Bump copyright years.Barry Warsaw2014-01-0113-13/+13
|
* Checkpointing.Barry Warsaw2013-11-252-2/+45
|
* Only do the cleanup if we're not using SQLite.Barry Warsaw2013-10-242-6/+6
|
* Test repair, and import enum from the right place.Barry Warsaw2013-09-011-2/+3
|
* trunk mergeBarry Warsaw2013-09-012-7/+7
|\
| * Switch to PEP 435 enums from flufl.enums.Barry Warsaw2013-06-182-7/+7
| |
* | remove debuggingBarry Warsaw2013-09-011-1/+0
| |
* | Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-0111-83/+262
|/ | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* Bump copyright years.Barry Warsaw2013-01-0111-11/+11
|
* Remove mailinglist.admin_member_chunksize.Barry Warsaw2012-12-303-5/+8
|
* Remove mailinglist.private_roster.Barry Warsaw2012-12-303-4/+7
|
* Remove unused columns mailinglist.subscribe_policy,Barry Warsaw2012-12-303-8/+10
| | | | mailinglist.unsubscribe_policy, mailinglist.subscribe_auto_approval.
* Remove mailinglist.send_reminders column too.Barry Warsaw2012-12-303-7/+10
|
* * The column `mailinglist.new_member_options` was unused, and has beenBarry Warsaw2012-12-304-2/+229
| | | | removed.
* Revert the addition of the mailinglist.style_name column, as well as theBarry Warsaw2012-12-293-11/+1
| | | | | | | | | | | | 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-283-4/+24
| | | | | | | | | | | | | | | | | * 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-166-81/+232
| | | | | | | | | | | | -------- * 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-052-6/+37
|
* * Schema migrations (LP: #1024509)Barry Warsaw2012-09-043-3/+66
| | | | - member.mailing_list -> list_id
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-043-27/+70
| | | | | | | | | | | | | | | 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-202-3/+22
| | | | | | | | | - 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-194-4/+7
| | | | (LP: #975696)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-2617-103/+1268
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-253-16/+105
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * The final bit of refactoring puts the specifics of making a temporary databaseBarry Warsaw2012-07-253-52/+74
| | | | | | | | into the hands of the database modules, by using ZCA adapters.
| * Fix resetting PostgreSQL databases, thus making the full test suite pass withBarry Warsaw2012-07-253-42/+35
| | | | | | | | them.
| * Add a temporary database factory so we can remove more cruft from theBarry Warsaw2012-07-253-39/+46
| | | | | | | | | | | | | | | | | | 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.
| * The version component is no longer necessary.Barry Warsaw2012-07-251-3/+0
| |
| * Refactor a slightly better way of indicating which tables should be reset byBarry Warsaw2012-07-251-9/+9
| | | | | | | | the testing framework.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-255-62/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * A few more tweaks to get PostgreSQL working.Barry Warsaw2012-07-253-11/+5
| | | | | | | | | | - 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-253-18/+18
| |
| * Refactor once again for SQLite/PostgreSQL differences.Barry Warsaw2012-07-253-65/+43
| |
| * No need to parameterize the exceptions, since Storm does this for us.Barry Warsaw2012-07-253-7/+3
| |
| * Very nearly there with PostgreSQL support for testing the beta2 migration.Barry Warsaw2012-07-258-62/+205
| | | | | | | | | | | | | | | | | | - 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-237-101/+480
| | | | | | | | | | | | | | | | | | - 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