mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
"""user auth
|
|
|
|
Revision ID: 2dcc708f88f8
|
|
Revises: 0d1ee3949d21
|
|
Create Date: 2023-07-22 12:19:28.780926
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '2dcc708f88f8'
|
|
down_revision = '0d1ee3949d21'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('user',
|
|
sa.Column('id', sa.UUID(), nullable=False),
|
|
sa.Column('email', sa.String(), nullable=False),
|
|
sa.Column('first_name', sa.String(), nullable=False),
|
|
sa.Column('last_name', sa.String(), nullable=False),
|
|
sa.Column('password', sa.LargeBinary(), nullable=False),
|
|
sa.PrimaryKeyConstraint('id'),
|
|
sa.UniqueConstraint('id')
|
|
)
|
|
op.create_unique_constraint(None, 'nonsense', ['name'], schema='happy_hog')
|
|
op.create_unique_constraint(None, 'stuff', ['name'], schema='happy_hog')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'stuff', schema='happy_hog', type_='unique')
|
|
op.drop_constraint(None, 'nonsense', schema='happy_hog', type_='unique')
|
|
op.drop_table('user')
|
|
# ### end Alembic commands ###
|