Migrate data back to Image in preparation for v2

This commit is contained in:
Jake Moshenko 2015-09-15 11:53:31 -04:00
parent abb1486a96
commit b56de3355c
7 changed files with 72 additions and 6 deletions

View file

@ -0,0 +1,34 @@
"""Migrate image data back to image table
Revision ID: 545794454f49
Revises: 3a3bb77e17d5
Create Date: 2015-09-15 11:48:47.554255
"""
# revision identifiers, used by Alembic.
revision = '545794454f49'
down_revision = '3a3bb77e17d5'
from alembic import op
import sqlalchemy as sa
def upgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.add_column('image', sa.Column('aggregate_size', sa.BigInteger(), nullable=True))
op.add_column('image', sa.Column('command', sa.Text(), nullable=True))
op.add_column('image', sa.Column('comment', sa.Text(), nullable=True))
op.add_column('image', sa.Column('created', sa.DateTime(), nullable=True))
op.add_column('image', sa.Column('v1_json_metadata', sa.Text(), nullable=True))
### end Alembic commands ###
def downgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.drop_column('image', 'v1_json_metadata')
op.drop_column('image', 'created')
op.drop_column('image', 'comment')
op.drop_column('image', 'command')
op.drop_column('image', 'aggregate_size')
### end Alembic commands ###