2024-03-04 07:12:29 +03:00
|
|
|
"""initial
|
|
|
|
|
|
|
|
Revision ID: ec1380cb4f18
|
|
|
|
Revises:
|
|
|
|
Create Date: 2024-03-04 03:11:36.206211
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2024-03-06 02:28:59 +03:00
|
|
|
from collections.abc import Sequence
|
2024-03-04 07:12:29 +03:00
|
|
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
from alembic import op
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision: str = "ec1380cb4f18"
|
|
|
|
down_revision: str | None = None
|
|
|
|
branch_labels: str | Sequence[str] | None = None
|
|
|
|
depends_on: str | Sequence[str] | None = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade() -> None:
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table(
|
|
|
|
"users",
|
|
|
|
sa.Column("id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("email", sa.String(), nullable=True),
|
|
|
|
sa.Column("hashed_password", sa.String(), nullable=True),
|
|
|
|
sa.Column("is_active", sa.Boolean(), nullable=True),
|
|
|
|
sa.PrimaryKeyConstraint("id"),
|
|
|
|
sa.UniqueConstraint("email"),
|
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade() -> None:
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_table("users")
|
|
|
|
# ### end Alembic commands ###
|