
# revision identifiers, used by Alembic.
revision = '174eb928136a'
down_revision = 'd5b07c8f0893'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('user', sa.Column('restrict', sa.Boolean))


def downgrade():
    op.drop_column('user', 'restrict')


# revision identifiers, used by Alembic.
revision = '174eb928136a'
down_revision = 'd5b07c8f0893'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('user', sa.Column('restrict', sa.Boolean, default=False))
    sql = 'update "user" set restrict=false'
    op.execute(sql)


def downgrade():
    op.drop_column('user', 'restrict')

Set default to False, and update existing users.
Set default to False, and update existing users.

  
  # revision identifiers, used by Alembic.
  revision = '174eb928136a'
  down_revision = 'd5b07c8f0893'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
-     op.add_column('user', sa.Column('restrict', sa.Boolean))
+     op.add_column('user', sa.Column('restrict', sa.Boolean, default=False))
+     sql = 'update "user" set restrict=false'
+     op.execute(sql)
  
  
  def downgrade():
      op.drop_column('user', 'restrict')
  
Set default to False, and update existing users.
## Code Before:

# revision identifiers, used by Alembic.
revision = '174eb928136a'
down_revision = 'd5b07c8f0893'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('user', sa.Column('restrict', sa.Boolean))


def downgrade():
    op.drop_column('user', 'restrict')

## Instruction:
Set default to False, and update existing users.
## Code After:

# revision identifiers, used by Alembic.
revision = '174eb928136a'
down_revision = 'd5b07c8f0893'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.add_column('user', sa.Column('restrict', sa.Boolean, default=False))
    sql = 'update "user" set restrict=false'
    op.execute(sql)


def downgrade():
    op.drop_column('user', 'restrict')
