~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/database/docs/migration.rst

  • Committer: Barry Warsaw
  • Date: 2012-08-20 15:06:03 UTC
  • Revision ID: barry@list.org-20120820150603-31d0tove8m7swhfp
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.   

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
    20129999000001
181
181
    20129999000002
182
182
    20129999000003
 
183
 
 
184
 
 
185
.. cleanup:
 
186
    Because the Version table holds schema migration data, it will not be
 
187
    cleaned up by the standard test suite.  This is generally not a problem
 
188
    for SQLite since each test gets a new database file, but for PostgreSQL,
 
189
    this will cause migration.rst to fail on subsequent runs.  So let's just
 
190
    clean up the database explicitly.
 
191
 
 
192
    >>> results = config.db.store.execute("""
 
193
    ...     DELETE FROM version WHERE version.version >= '201299990000'
 
194
    ...                            OR version.component = 'test';
 
195
    ...     """)
 
196
    >>> config.db.commit()