|
| 1 | +"""add user table |
| 2 | +
|
| 3 | +Revision ID: 27b56cc8451c |
| 4 | +Revises: ec7ff666caa2 |
| 5 | +Create Date: 2025-02-12 21:20:27.278350 |
| 6 | +
|
| 7 | +""" |
| 8 | +from alembic import op |
| 9 | +import sqlalchemy as sa |
| 10 | + |
| 11 | + |
| 12 | +# revision identifiers, used by Alembic. |
| 13 | +revision = '27b56cc8451c' |
| 14 | +down_revision = 'ec7ff666caa2' |
| 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('id', sa.Integer(), nullable=False), |
| 23 | + sa.Column('email', sa.String(length=120), nullable=False), |
| 24 | + sa.Column('email_normalized', sa.String(length=120), nullable=False), |
| 25 | + sa.Column('password_hash', sa.String(length=256), nullable=False), |
| 26 | + sa.Column('created_on', sa.DateTime(), nullable=False), |
| 27 | + sa.PrimaryKeyConstraint('id', name=op.f('user_pkey')), |
| 28 | + sa.UniqueConstraint('email_normalized', name=op.f('user_email_normalized_key')) |
| 29 | + ) |
| 30 | + # ### end Alembic commands ### |
| 31 | + |
| 32 | + |
| 33 | +def downgrade(): |
| 34 | + # ### commands auto generated by Alembic - please adjust! ### |
| 35 | + op.drop_table('user') |
| 36 | + # ### end Alembic commands ### |
0 commit comments