Пример #1
0
def upgrade():

    ## Task Queue
    table_name = "task_queue"
    update_columns = {"spec"}

    def transformer(old_data):

        spec = old_data["spec"]

        return {"spec_": msgpackext_dumps(spec)}

    msgpack_migrations.json_to_msgpack_table(table_name, block_size,
                                             update_columns, transformer)

    ## Service Queue
    table_name = "service_queue"
    update_columns = {"extra"}

    def transformer(old_data):

        spec = old_data["extra"]

        return {"extra_": msgpackext_dumps(spec)}

    msgpack_migrations.json_to_msgpack_table(table_name, block_size,
                                             update_columns, transformer, {})
Пример #2
0
def upgrade():
    msgpack_migrations.json_to_msgpack_table(
        table_name,
        block_size,
        update_columns,
        transformer,
        read_columns={"driver": sa.String})
def upgrade():
    msgpack_migrations.json_to_msgpack_table(table_name, block_size,
                                             converters.keys(), transformer)
def upgrade():
    msgpack_migrations.json_to_msgpack_table(table_name, block_size,
                                             update_columns, transformer)