summaryrefslogtreecommitdiff
path: root/src/mailman/database/docs
diff options
context:
space:
mode:
authorBarry Warsaw2012-08-20 11:06:03 -0400
committerBarry Warsaw2012-08-20 11:06:03 -0400
commit5ad4218c2fb6cdaf735b09e71369fd01be12a332 (patch)
tree6e31f4a496d1cfce2267d668ca0d280d50b2857a /src/mailman/database/docs
parent33092bbbab94df6170104e6c4f888c424d589cbf (diff)
downloadmailman-5ad4218c2fb6cdaf735b09e71369fd01be12a332.tar.gz
mailman-5ad4218c2fb6cdaf735b09e71369fd01be12a332.tar.zst
mailman-5ad4218c2fb6cdaf735b09e71369fd01be12a332.zip
A few fixes for schema migration on PostgreSQL.
- 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.
Diffstat (limited to 'src/mailman/database/docs')
-rw-r--r--src/mailman/database/docs/migration.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mailman/database/docs/migration.rst b/src/mailman/database/docs/migration.rst
index a4d25d648..6216f9bbc 100644
--- a/src/mailman/database/docs/migration.rst
+++ b/src/mailman/database/docs/migration.rst
@@ -180,3 +180,17 @@ You'll notice that the ...04 version is not present.
20129999000001
20129999000002
20129999000003
+
+
+.. cleanup:
+ Because the Version table holds schema migration data, it will not be
+ cleaned up by the standard test suite. This is generally not a problem
+ for SQLite since each test gets a new database file, but for PostgreSQL,
+ this will cause migration.rst to fail on subsequent runs. So let's just
+ clean up the database explicitly.
+
+ >>> results = config.db.store.execute("""
+ ... DELETE FROM version WHERE version.version >= '201299990000'
+ ... OR version.component = 'test';
+ ... """)
+ >>> config.db.commit()