diff --git a/data/migrations/versions/152edccba18c_make_blodupload_byte_count_not_nullable.py b/data/migrations/versions/152edccba18c_make_blodupload_byte_count_not_nullable.py new file mode 100644 index 000000000..cf66ef81d --- /dev/null +++ b/data/migrations/versions/152edccba18c_make_blodupload_byte_count_not_nullable.py @@ -0,0 +1,24 @@ +"""Make BlodUpload byte_count not nullable + +Revision ID: 152edccba18c +Revises: c91c564aad34 +Create Date: 2018-02-23 12:41:25.571835 + +""" + +# revision identifiers, used by Alembic. +revision = '152edccba18c' +down_revision = 'c91c564aad34' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(tables): + op.alter_column('blobupload', 'byte_count', existing_type=sa.BigInteger(), + nullable=False) + + +def downgrade(tables): + op.alter_column('blobupload', 'byte_count', existing_type=sa.BigInteger(), + nullable=True) diff --git a/test/data/test.db b/test/data/test.db index 7ad64f419..f3806a876 100644 Binary files a/test/data/test.db and b/test/data/test.db differ