Move v1 checksums to image and track v2 separately

This commit is contained in:
Jake Moshenko 2015-11-04 16:18:53 -05:00 committed by Jimmy Zelinskie
parent 2b3633b107
commit 3d0bcbaaeb
8 changed files with 65 additions and 17 deletions

View file

@ -0,0 +1,30 @@
"""Separate v1 and v2 checksums.
Revision ID: 2827d36939e4
Revises: 73669db7e12
Create Date: 2015-11-04 16:29:48.905775
"""
# revision identifiers, used by Alembic.
revision = '2827d36939e4'
down_revision = '73669db7e12'
from alembic import op
import sqlalchemy as sa
def upgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.add_column('image', sa.Column('v1_checksum', sa.String(length=255), nullable=True))
op.add_column('imagestorage', sa.Column('content_checksum', sa.String(length=255), nullable=True))
op.create_index('imagestorage_content_checksum', 'imagestorage', ['content_checksum'], unique=False)
### end Alembic commands ###
def downgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.drop_index('imagestorage_content_checksum', table_name='imagestorage')
op.drop_column('imagestorage', 'content_checksum')
op.drop_column('image', 'v1_checksum')
### end Alembic commands ###

View file

@ -12,10 +12,6 @@ down_revision = '35f538da62'
from alembic import op
import sqlalchemy as sa
<<<<<<< HEAD
=======
from sqlalchemy.dialects import mysql
>>>>>>> Remove the used_legacy_github column
def upgrade(tables):
### commands auto generated by Alembic - please adjust! ###