|
| 1 | +"""user auth |
| 2 | +
|
| 3 | +Revision ID: 2dcc708f88f8 |
| 4 | +Revises: 0d1ee3949d21 |
| 5 | +Create Date: 2023-07-22 12:19:28.780926 |
| 6 | +
|
| 7 | +""" |
| 8 | +from alembic import op |
| 9 | +import sqlalchemy as sa |
| 10 | + |
| 11 | + |
| 12 | +# revision identifiers, used by Alembic. |
| 13 | +revision = '2dcc708f88f8' |
| 14 | +down_revision = '0d1ee3949d21' |
| 15 | +branch_labels = None |
| 16 | +depends_on = None |
| 17 | + |
| 18 | + |
| 19 | +def upgrade(): |
| 20 | + # ### commands auto generated by Alembic - please adjust! ### |
| 21 | + op.create_table('user', |
| 22 | + sa.Column('uuid', sa.UUID(), nullable=False), |
| 23 | + sa.Column('email', sa.String(), nullable=False), |
| 24 | + sa.Column('first_name', sa.String(), nullable=False), |
| 25 | + sa.Column('last_name', sa.String(), nullable=False), |
| 26 | + sa.Column('password', sa.LargeBinary(), nullable=False), |
| 27 | + sa.PrimaryKeyConstraint('uuid'), |
| 28 | + sa.UniqueConstraint('uuid') |
| 29 | + ) |
| 30 | + op.create_unique_constraint(None, 'nonsense', ['name'], schema='happy_hog') |
| 31 | + op.create_unique_constraint(None, 'stuff', ['name'], schema='happy_hog') |
| 32 | + # ### end Alembic commands ### |
| 33 | + |
| 34 | + |
| 35 | +def downgrade(): |
| 36 | + # ### commands auto generated by Alembic - please adjust! ### |
| 37 | + op.drop_constraint(None, 'stuff', schema='happy_hog', type_='unique') |
| 38 | + op.drop_constraint(None, 'nonsense', schema='happy_hog', type_='unique') |
| 39 | + op.drop_table('user') |
| 40 | + # ### end Alembic commands ### |
0 commit comments