Changeset 49
- Timestamp:
- 05/14/09 18:51:23 (3 years ago)
- File:
-
- 1 edited
-
migration/migrate.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
migration/migrate.py
r34 r49 34 34 V_RC4 = 1 35 35 V_RC5 = 2 36 LATEST_VERSION = V_RC5 36 V_RC6 = 3 37 LATEST_VERSION = V_RC6 37 38 UNKNOWN_VERSION = -1 38 39 39 40 version_names = { V_RC4: "RC4", 40 41 V_RC5: "RC5", 42 V_RC6: "RC6", 41 43 UNKNOWN_VERSION: "(unknown)" } 42 44 43 45 upgrade_sql_files = { V_RC4: "rc4-to-rc5.sql", 44 V_RC5: None } 46 V_RC5: "rc5-to-rc6.sql", 47 V_RC6: None } 45 48 46 49 def detect_xts_version(db): 47 50 has_payment_type = False 51 has_online = False 48 52 49 53 tables = db.query("SHOW TABLES;"); … … 55 59 if not has_payment_type: 56 60 return V_RC4 57 return V_RC5 61 62 proto_table = db.query("SHOW COLUMNS FROM snewts_ticketprototype"); 63 for proto_col in proto_table: 64 if proto_col.values()[0] == "online": 65 has_online = True 66 break 67 68 if not has_online: 69 return V_RC5 70 71 return V_RC6 58 72 59 73 def run_migrate_step(ver, db, mcb):
Note: See TracChangeset
for help on using the changeset viewer.
