1 def migrate_up(manager): 2 manager.execute("""ALTER TABLE hosts 3 ADD COLUMN locked_by_id 4 INT(11) DEFAULT NULL""") 5 manager.execute("""ALTER TABLE hosts 6 ADD COLUMN lock_time 7 DATETIME DEFAULT NULL""") 8 9 10 def migrate_down(manager): 11 manager.execute('ALTER TABLE hosts DROP COLUMN locked_by_id') 12 manager.execute('ALTER TABLE hosts DROP COLUMN lock_time') 13