diff --git a/data/migrations/versions/127905a52fdd_remove_the_deprecated_imagestorage_.py b/data/migrations/versions/127905a52fdd_remove_the_deprecated_imagestorage_.py new file mode 100644 index 000000000..06c20c015 --- /dev/null +++ b/data/migrations/versions/127905a52fdd_remove_the_deprecated_imagestorage_.py @@ -0,0 +1,32 @@ +"""Remove the deprecated imagestorage columns. + +Revision ID: 127905a52fdd +Revises: 2e0380215d01 +Create Date: 2015-09-17 15:48:56.667823 + +""" + +# revision identifiers, used by Alembic. +revision = '127905a52fdd' +down_revision = '2e0380215d01' + +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_column('imagestorage', 'comment') + op.drop_column('imagestorage', 'aggregate_size') + op.drop_column('imagestorage', 'command') + op.drop_column('imagestorage', 'created') + ### end Alembic commands ### + + +def downgrade(tables): + ### commands auto generated by Alembic - please adjust! ### + op.add_column('imagestorage', sa.Column('created', mysql.DATETIME(), nullable=True)) + op.add_column('imagestorage', sa.Column('command', mysql.TEXT(), nullable=True)) + op.add_column('imagestorage', sa.Column('aggregate_size', mysql.BIGINT(display_width=20), autoincrement=False, nullable=True)) + op.add_column('imagestorage', sa.Column('comment', mysql.TEXT(), nullable=True)) + ### end Alembic commands ###