From e965ed9f3b86b79671fd26452a2de62c439a9a02 Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 17 Sep 2015 15:51:06 -0400 Subject: [PATCH] Remove the unused imagestorage columns from the db. --- ...fdd_remove_the_deprecated_imagestorage_.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 data/migrations/versions/127905a52fdd_remove_the_deprecated_imagestorage_.py 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 ###