From 2410fe8c2578fbd11275cfc7fc1897173eecd41a Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sun, 8 Apr 2012 10:15:29 -0600 Subject: - 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. --- src/mailman/core/initialize.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mailman/core/initialize.py') 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. -- cgit v1.2.3-70-g09d2