Handle the common case of one chunk when calculating the uncompressed size

Reference #992
This commit is contained in:
Joseph Schorr 2015-11-30 14:25:01 -05:00
parent 1323da20e3
commit 54095eb5cb
6 changed files with 65 additions and 4 deletions

View file

@ -0,0 +1,28 @@
"""Add new blobupload columns
Revision ID: 403d02fea323
Revises: 10b999e8db1f
Create Date: 2015-11-30 14:25:46.822730
"""
# revision identifiers, used by Alembic.
revision = '403d02fea323'
down_revision = '10b999e8db1f'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.add_column('blobupload', sa.Column('chunk_count', sa.Integer(), nullable=False))
op.add_column('blobupload', sa.Column('uncompressed_byte_count', sa.Integer(), nullable=True))
### end Alembic commands ###
def downgrade(tables):
### commands auto generated by Alembic - please adjust! ###
op.drop_column('blobupload', 'uncompressed_byte_count')
op.drop_column('blobupload', 'chunk_count')
### end Alembic commands ###