Tracking PR for registration rewrite #5
2 changed files with 33 additions and 0 deletions
|
@ -13,6 +13,7 @@ class User(db.Model, UserMixin):
|
|||
last_login = Column(DateTime, nullable=False)
|
||||
active = Column(Boolean, nullable=False, default=True)
|
||||
is_admin = Column(Boolean, nullable=False, default=False)
|
||||
waitlisted = Column(Boolean, nullable=False, default=False)
|
||||
|
||||
|
||||
@login.user_loader
|
||||
|
|
32
migrations/versions/d210860eb46a_add_waitlist_field.py
Normal file
32
migrations/versions/d210860eb46a_add_waitlist_field.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
"""add waitlist field
|
||||
|
||||
Revision ID: d210860eb46a
|
||||
Revises: afb7433de2f3
|
||||
Create Date: 2022-12-05 17:12:08.061473
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd210860eb46a'
|
||||
down_revision = 'afb7433de2f3'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('waitlisted', sa.Boolean(), nullable=False))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('user', schema=None) as batch_op:
|
||||
batch_op.drop_column('waitlisted')
|
||||
|
||||
# ### end Alembic commands ###
|
Loading…
Add table
Reference in a new issue