def test_rename(self): mapping = { 'table1' : 'new_table1', 'table2' : 'new_table2', } self._setup_exists_expects((name for name, _ in mapping.iteritems()), 'TABLES') for name, new_name in mapping.iteritems(): self.manager.execute.expect_call( 'RENAME TABLE `%s` TO `%s`' % (name, new_name)) db_utils.rename(self.manager, mapping) self.god.check_playback()
def migrate_down(manager): db_utils.drop_views(manager, VIEWS_TO_DROP_DOWN) db_utils.rename(manager, RENAMES_DOWN) manager.execute_script(RECREATE_VIEWS_DOWN)
def migrate_down(manager): db_utils.rename(manager, RENAMES_DOWN)
def migrate_up(manager): db_utils.rename(manager, RENAMES_UP)