mirror of https://github.com/logos-co/open-law.git
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
"""user_is_activated
|
|
|
|
Revision ID: 377fc0b7e4bb
|
|
Revises: a1345b416f81
|
|
Create Date: 2023-05-04 11:14:58.810826
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '377fc0b7e4bb'
|
|
down_revision = 'a1345b416f81'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('users', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('is_activated', sa.Boolean(), nullable=True))
|
|
batch_op.alter_column('username',
|
|
existing_type=sa.VARCHAR(length=60),
|
|
nullable=True)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table('users', schema=None) as batch_op:
|
|
batch_op.alter_column('username',
|
|
existing_type=sa.VARCHAR(length=60),
|
|
nullable=False)
|
|
batch_op.drop_column('is_activated')
|
|
|
|
# ### end Alembic commands ###
|