summaryrefslogtreecommitdiff
path: root/src/mailman/database/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Convert to click for CLI optionsBarry Warsaw2017-07-221-1/+1
|
* Implement SQLAlchemy pre-ping to detect dropped connections.Mark Sapiro2017-03-271-1/+41
|
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* MySQL is now an officially supported database.Barry Warsaw2016-07-291-1/+1
| | | | Given by Abhilash Raj.
* New template system. Closes #249Barry Warsaw2016-07-161-1/+1
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Clean up the database directory.Barry Warsaw2016-03-241-6/+2
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-7/+4
|
* Remove some unnecessary code, and revert back to SQLite by default for theBarry Warsaw2014-11-011-6/+0
| | | | test suite.
* DatabaseBarry Warsaw2014-11-011-125/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -------- * The ORM layer, previously implemented with Storm, has been replaced by SQLAlchemy, thanks to the fantastic work by Abhilash Raj and Aurélien Bompard. Alembic is now used for all database schema migrations. * The new logger `mailman.database` logs any errors at the database layer. API --- * Several changes to the internal API: - `IListManager.mailing_lists` is guaranteed to be sorted in List-ID order. - `IDomains.mailing_lists` is guaranteed to be sorted in List-ID order. - Iteration over domains via the `IDomainManager` is guaranteed to be sorted by `IDomain.mail_host` order. - `ITemporaryDatabase` interface and all implementations are removed.
| * Merge abompard's fixes to the Postgres test suite.Barry Warsaw2014-10-301-0/+6
| |
| * Merge Aurélien Bompard's latest merge branch, with some cleaning up by Barry.Barry Warsaw2014-10-131-10/+0
| |\
| | * Merge from Abhilash's branchAurélien Bompard2014-10-061-1/+0
| | |\
| | * | Alembic stamping is done in the schema manager nowAurélien Bompard2014-10-031-12/+0
| | | |
| * | | Merge Abhilash's latest revisions.Barry Warsaw2014-10-111-1/+0
| | |/ | |/|
| * | add central alembic configAbhilash Raj2014-10-031-4/+1
| | |
| * | Remove an unused import.Barry Warsaw2014-10-021-1/+0
| | |
| * | Fix the test suite.Barry Warsaw2014-10-021-1/+1
| | | | | | | | | | | | | | | * Fix a couple of typos. * Make the script_location and alembic_scripts a resource paths.
| * | PostgreSQL support by Abhilash, cleaned by Barry.Barry Warsaw2014-09-271-0/+15
| |\|
| | * * fixed a bug where alemnic could not find its migrations directoryAbhilash Raj2014-09-251-0/+14
| |/ | | | | | | * add a new method in base database to stamp with latest alembic version
| * We do not need _database_exists() or _make_temporary() any more either.Barry Warsaw2014-09-231-14/+0
| |
| * Since we don't have migrations, we don't need the ITemporaryDatabase stuff,Barry Warsaw2014-09-231-38/+0
| | | | | | | | | | nor do we need the TAG mechanism. We also don't need load_sql() or load_migrations().
| * Re-add the _prepare() method for SQLite permissions.Barry Warsaw2014-09-221-0/+10
| |
| * Clean up pass.Barry Warsaw2014-09-221-13/+12
| |
| * * remove some unused codeAbhilash Raj2014-09-191-31/+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-191-12/+0
| | | | | | | | * fix almost all the errors relating to doctests
| * all tests except for importer working(ignoring test_migrations.py)Abhilash Raj2014-09-181-41/+16
| |
| * modify all storm queries to work with SAAbhilash Raj2014-09-121-44/+55
| |
| * * change declarative_base class to use ModelMeta classAbhilash Raj2014-09-061-83/+6
| | | | | | | | * update some queries to match SA style
| * add new database base model for sqlalchemyAbhilash Raj2014-09-041-0/+38
|/
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Migrate bounceevent.list_name -> bounceevent.list_idBarry Warsaw2013-09-011-9/+2
| | | | | | | * Rename StormBaseDatabase._create() -> .initialize() * Refactor database initialization. * make_listid() helper. * Add a pivot() helper for schema migrations.
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-191-0/+1
| | | | (LP: #975696)
* The version component is no longer necessary.Barry Warsaw2012-07-251-3/+0
|
* Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-251-7/+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-251-3/+7
| | | | | | | | | - 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-9/+23
| | | | | | | | | - 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-201-1/+1
| | | | | | | - migrations.rst needs to handle new standard migration - Add ResetHelper() to refactor out common migration test cooperation. - Handle temporary database. - Fix some attribute names.
* trunk mergeBarry Warsaw2012-06-031-5/+4
|\
| * General code cleanup.Barry Warsaw2012-04-251-5/+4
| | | | | | | | | | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
* | - Refactor the way databases are schema-migrated so that load_migrations()Barry Warsaw2012-04-081-4/+11
|/ | | | | | | | | | | | | | | 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.
* * Schema migrations have been implemented.Barry Warsaw2012-02-121-32/+73
|
* copybumpBarry Warsaw2012-01-011-1/+1
|
* * Fix a couple of spelling errors.Barry Warsaw2011-11-021-14/+10
| | | | | | * Code cleanup (<> -> != ... sigh) * Minor refactoring of database setup code so that touch() is moved to the SQLiteDatabase class; it's not relevant for PostgreSQL.
* Add database specific pre- and post- reset callbacks. Use this to implementBarry Warsaw2011-10-231-0/+18
| | | | primary key reset for PostgreSQL, fixing several tests.
* - Be a little more careful about preparing the SQL statements for executionBarry Warsaw2011-10-221-2/+9
| | | | | | in the database, namely strip out empty lines and comments first, otherwise PostgreSQL spews "empty statement" errors at us. - Down to 4 test failures.
* Merge PostgreSQL support from Stephen A. Goss, with refactoring by Barry. LP:Barry Warsaw2011-10-221-0/+159
#860159.