diff options
| author | Barry Warsaw | 2012-04-08 10:15:29 -0600 |
|---|---|---|
| committer | Barry Warsaw | 2012-04-08 10:15:29 -0600 |
| commit | 2410fe8c2578fbd11275cfc7fc1897173eecd41a (patch) | |
| tree | 77d5e612f2efd1844bb777102067f3f658aa499c /src/mailman/core/initialize.py | |
| parent | 7abcd4faa1553fb012020b6204fb8b6208fa5bf2 (diff) | |
| download | mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.tar.gz mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.tar.zst mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.zip | |
- Refactor the way databases are schema-migrated so that load_migrations()
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.
Diffstat (limited to 'src/mailman/core/initialize.py')
| -rw-r--r-- | src/mailman/core/initialize.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mailman/core/initialize.py b/src/mailman/core/initialize.py index 389a45f3b..5659661a7 100644 --- a/src/mailman/core/initialize.py +++ b/src/mailman/core/initialize.py @@ -124,6 +124,7 @@ def initialize_1(config_path=None): def initialize_2(debug=False, propagate_logs=None): """Second initialization step. + * Database * Logging * Pre-hook * Rules @@ -148,6 +149,8 @@ def initialize_2(debug=False, propagate_logs=None): database = call_name(database_class) verifyObject(IDatabase, database) database.initialize(debug) + database.load_migrations() + database.commit() config.db = database # Initialize the rules and chains. Do the imports here so as to avoid # circular imports. |
