summaryrefslogtreecommitdiff
path: root/src/mailman/database/postgresql.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-07-25 17:48:47 -0400
committerBarry Warsaw2012-07-25 17:48:47 -0400
commitc15688eb88db81340a7602093134e10e8927b2fc (patch)
tree11fc83bf64a436fd39492441e3383a109b02d867 /src/mailman/database/postgresql.py
parent3ecb13338d36f7f4bccb609bdb2d54ff11359f8f (diff)
downloadmailman-c15688eb88db81340a7602093134e10e8927b2fc.tar.gz
mailman-c15688eb88db81340a7602093134e10e8927b2fc.tar.zst
mailman-c15688eb88db81340a7602093134e10e8927b2fc.zip
Refactor to better handling the difference between a testing database and a
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.
Diffstat (limited to 'src/mailman/database/postgresql.py')
0 files changed, 0 insertions, 0 deletions