Mercurial > bitten > bitten-test
changeset 619:3dd1b2d4b2a7
After lengthy waiting and no complaints of data loss, add the final step of dropping the old data with witty commentary. See #329
author | dfraser |
---|---|
date | Thu, 06 Aug 2009 18:41:00 +0000 |
parents | 9c135b1a3b60 |
children | cb2278ed9541 |
files | bitten/upgrades.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/upgrades.py +++ b/bitten/upgrades.py @@ -334,8 +334,13 @@ env.log.info("Migrated log %s", log_id) env.log.warning("Logs have been migrated from the database to files in %s. " "Ensure permissions are set correctly on this file. " - "When you have confirmed that the migration worked correctly, " - "you can drop the bitten_log_message table in the database (it remains as a backup)", logs_dir) + "Since we presume that the migration worked correctly, " + "we are now dropping the bitten_log_message table in the database (aren't you glad you backed up)", logs_dir) + cursor.close() + cursor = db.cursor() + cursor.execute("DROP TABLE bitten_log_message") + cursor.close() + env.log.warning("We have dropped the bitten_log_message table - you may want to vaccuum/compress your database to save space") def recreate_rule_with_int_id(env, db): """Recreates the bitten_rule table with an integer id column rather than a text one."""