diff --git a/alembic/versions/4255158a6913_create_private_column_in_project_table.py b/alembic/versions/4255158a6913_create_private_column_in_project_table.py index 2e8211e..f489113 100644 --- a/alembic/versions/4255158a6913_create_private_column_in_project_table.py +++ b/alembic/versions/4255158a6913_create_private_column_in_project_table.py @@ -19,9 +19,15 @@ def upgrade(): ''' op.add_column( 'projects', - sa.Column('private', sa.Boolean, nullable=False, default=False) + sa.Column('_private', sa.Boolean, nullable=True, default=False) ) + op.execute('''UPDATE "projects" ''' + '''SET _private=False;''') + op.alter_column( + 'projects', + column_name='_private', new_column_name='private', + nullable=False, existing_nullable=True) def downgrade():