This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/migrations/versions/5d463ea1e8a8_backfill_new_appr_tables.py

33 lines
1.1 KiB
Python
Raw Normal View History

2019-11-12 16:09:47 +00:00
"""Backfill new appr tables
Revision ID: 5d463ea1e8a8
Revises: 610320e9dacf
Create Date: 2018-07-08 10:01:19.756126
"""
# revision identifiers, used by Alembic.
revision = '5d463ea1e8a8'
down_revision = '610320e9dacf'
from alembic import op as original_op
from data.migrations.progress import ProgressWrapper
import sqlalchemy as sa
from util.migrate.table_ops import copy_table_contents
def upgrade(tables, tester, progress_reporter):
op = ProgressWrapper(original_op, progress_reporter)
conn = op.get_bind()
copy_table_contents('blob', 'apprblob', conn)
copy_table_contents('manifest', 'apprmanifest', conn)
copy_table_contents('manifestlist', 'apprmanifestlist', conn)
copy_table_contents('blobplacement', 'apprblobplacement', conn)
copy_table_contents('manifestblob', 'apprmanifestblob', conn)
copy_table_contents('manifestlistmanifest', 'apprmanifestlistmanifest', conn)
copy_table_contents('tag', 'apprtag', conn)
def downgrade(tables, tester, progress_reporter):
op = ProgressWrapper(original_op, progress_reporter)
pass