mbligh | e8819cd | 2008-02-15 16:48:40 +0000 | [diff] [blame] | 1 | def migrate_up(manager): |
jamesren | 92afa56 | 2010-03-23 00:19:26 +0000 | [diff] [blame] | 2 | raise Exception('migrate.py should be migrating directly to schema 51 ' |
| 3 | 'instead of running migration 1...') |
mbligh | e8819cd | 2008-02-15 16:48:40 +0000 | [diff] [blame] | 4 | |
| 5 | |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 6 | def migrate_down(manager): |
jadmanski | 0afbb63 | 2008-06-06 21:10:57 +0000 | [diff] [blame] | 7 | manager.execute_script(DROP_DB_SQL) |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 8 | |
| 9 | |
mbligh | aa383b7 | 2008-03-12 20:11:56 +0000 | [diff] [blame] | 10 | DROP_DB_SQL = """\ |
| 11 | DROP TABLE IF EXISTS `acl_groups`; |
| 12 | DROP TABLE IF EXISTS `acl_groups_hosts`; |
| 13 | DROP TABLE IF EXISTS `acl_groups_users`; |
| 14 | DROP TABLE IF EXISTS `autotests`; |
| 15 | DROP TABLE IF EXISTS `host_queue_entries`; |
| 16 | DROP TABLE IF EXISTS `hosts`; |
| 17 | DROP TABLE IF EXISTS `hosts_labels`; |
| 18 | DROP TABLE IF EXISTS `ineligible_host_queues`; |
| 19 | DROP TABLE IF EXISTS `jobs`; |
| 20 | DROP TABLE IF EXISTS `labels`; |
| 21 | DROP TABLE IF EXISTS `users`; |
| 22 | """ |