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/1849ca8199fc_remove_derivedimagestorage_table.py

38 lines
1.5 KiB
Python
Raw Normal View History

2015-11-25 16:46:59 +00:00
"""Remove DerivedImageStorage table
Revision ID: 1849ca8199fc
Revises: 5a2445ffe21b
Create Date: 2015-11-25 11:45:32.928533
"""
# revision identifiers, used by Alembic.
revision = '1849ca8199fc'
down_revision = '5a2445ffe21b'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.drop_table('derivedimagestorage')
### end Alembic commands ###
def downgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.create_table('derivedimagestorage',
sa.Column('id', mysql.INTEGER(display_width=11), nullable=False),
sa.Column('source_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
sa.Column('derivative_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
sa.Column('transformation_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(['derivative_id'], [u'imagestorage.id'], name=u'fk_derivedimagestorage_derivative_id_imagestorage'),
sa.ForeignKeyConstraint(['source_id'], [u'imagestorage.id'], name=u'fk_derivedimagestorage_source_id_imagestorage'),
sa.ForeignKeyConstraint(['transformation_id'], [u'imagestoragetransformation.id'], name=u'fk_dis_transformation_id_ist'),
sa.PrimaryKeyConstraint('id'),
mysql_default_charset=u'latin1',
mysql_engine=u'InnoDB'
)
### end Alembic commands ###