|
|
"""changed user schema
Revision ID: 282564545160 Revises: 1a0a82192181 Create Date: 2023-05-20 16:07:52.967576
"""
from alembic import op import sqlalchemy as sa
# revision identifiers, used by Alembic. revision = '282564545160' down_revision = '1a0a82192181' branch_labels = None depends_on = None
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('user', sa.Column('id', sa.Integer(), nullable=False), sa.Column('username', sa.String(), nullable=False), sa.Column('email', sa.String(), nullable=False), sa.Column('name', sa.String(), nullable=False), sa.Column('password', sa.String(), nullable=False), sa.Column('institution', sa.String(), nullable=False), sa.Column('position', sa.String(), nullable=False), sa.Column('admin', sa.Boolean(), nullable=True), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('email'), sa.UniqueConstraint('institution'), sa.UniqueConstraint('name'), sa.UniqueConstraint('position'), sa.UniqueConstraint('username') ) op.drop_table('admin') # ### end Alembic commands ###
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('admin', sa.Column('id', sa.INTEGER(), nullable=False), sa.Column('username', sa.VARCHAR(), nullable=False), sa.Column('password', sa.VARCHAR(), nullable=False), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('username') ) op.drop_table('user') # ### end Alembic commands ###
|