def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    tables = [define_metadef_objects_table(meta),
              define_metadef_properties_table(meta),
              define_metadef_namespace_resource_types_table(meta),
              define_metadef_resource_types_table(meta),
              define_metadef_namespaces_table(meta)]
    drop_tables(tables)
示例#2
0
def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    tables = [
        define_metadef_objects_table(meta),
        define_metadef_properties_table(meta),
        define_metadef_namespace_resource_types_table(meta),
        define_metadef_resource_types_table(meta),
        define_metadef_namespaces_table(meta)
    ]
    drop_tables(tables)
示例#3
0
def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine

    tasks_table = Table('tasks', meta, autoload=True)
    task_info_table = Table('task_info', meta, autoload=True)

    for col_name in TASKS_MIGRATE_COLUMNS:
        column = Column(col_name, Text())
        column.create(tasks_table)

    task_info_records = task_info_table.select().execute().fetchall()

    for task_info in task_info_records:
        values = {
            'input': task_info.input,
            'result': task_info.result,
            'message': task_info.message
        }

        tasks_table.update(values=values).where(
            tasks_table.c.id == task_info.task_id).execute()

    drop_tables([task_info_table])
示例#4
0
def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    tables = [define_tasks_table(meta)]
    drop_tables(tables)
示例#5
0
def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    tables = [get_image_members_table(meta)]
    drop_tables(tables)
def downgrade(migrate_engine):
    meta = schema.MetaData()
    meta.bind = migrate_engine
    tables = [define_image_tags_table(meta)]
    glance_schema.drop_tables(tables)
def downgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
    tables = [define_image_properties_table(meta)]
    drop_tables(tables)
def downgrade(migrate_engine):
    meta = sqlalchemy.schema.MetaData(migrate_engine)
    image_locations_table = sqlalchemy.Table('image_locations', meta,
                                             autoload=True)
    schema.drop_tables([image_locations_table])
def downgrade(migrate_engine):
    meta = schema.MetaData()
    meta.bind = migrate_engine
    tables = [define_image_tags_table(meta)]
    glance_schema.drop_tables(tables)
示例#10
0
def downgrade(migrate_engine):
    meta = sqlalchemy.schema.MetaData(migrate_engine)
    image_locations_table = sqlalchemy.Table('image_locations',
                                             meta,
                                             autoload=True)
    schema.drop_tables([image_locations_table])