Phase 2 of Appr migration
Backfills the new tables from the old ones, and switches all code to read and write from the new tables
This commit is contained in:
parent
d75e932d09
commit
acb7d626a4
4 changed files with 38 additions and 9 deletions
|
@ -0,0 +1,29 @@
|
|||
"""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
|
||||
import sqlalchemy as sa
|
||||
from util.migrate.table_ops import copy_table_contents
|
||||
|
||||
def upgrade(tables, tester):
|
||||
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):
|
||||
pass
|
Reference in a new issue