Tracking PR for registration rewrite #5

Merged
Muirrum merged 32 commits from rewrite into master 2022-12-15 18:32:08 -05:00
2 changed files with 33 additions and 0 deletions
Showing only changes of commit 02f2561c47 - Show all commits

View file

@ -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

View 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 ###