rough new admin panel, more changes pending
This commit is contained in:
36
migrations/versions/c23c31ae3a1d_auto_migrate.py
Normal file
36
migrations/versions/c23c31ae3a1d_auto_migrate.py
Normal file
@ -0,0 +1,36 @@
|
||||
"""auto-migrate
|
||||
|
||||
Revision ID: c23c31ae3a1d
|
||||
Revises: 30376c514135
|
||||
Create Date: 2025-06-28 08:31:46.351949
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'c23c31ae3a1d'
|
||||
down_revision = '30376c514135'
|
||||
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_deleted', sa.Boolean(), nullable=False))
|
||||
batch_op.add_column(sa.Column('is_banned', sa.Boolean(), nullable=False))
|
||||
batch_op.add_column(sa.Column('suspended_until', sa.DateTime(), 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.drop_column('suspended_until')
|
||||
batch_op.drop_column('is_banned')
|
||||
batch_op.drop_column('is_deleted')
|
||||
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user