Fixing the primary flag on the file table - it should never be null, it shoud just default to false.

This commit is contained in:
Dan Funk 2020-03-20 08:36:50 -04:00
parent 16c6ba9661
commit 61a46a9c41
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
"""empty message
Revision ID: 74254ecb1e90
Revises: 4d9ae1a4eb48
Create Date: 2020-03-20 08:09:13.858558
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '74254ecb1e90'
down_revision = '4d9ae1a4eb48'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('file', 'primary',
existing_type=sa.BOOLEAN(),
nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('file', 'primary',
existing_type=sa.BOOLEAN(),
nullable=True)
# ### end Alembic commands ###