flask-webhook/flask_demo_api/repository/migrations/versions/22f68d68c369_first.py

43 lines
1.1 KiB
Python
Raw Normal View History

2024-04-22 04:00:23 +03:00
"""First
Revision ID: 22f68d68c369
Revises:
Create Date: 2024-04-22 02:32:45.672666
"""
from collections.abc import Sequence
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "22f68d68c369"
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(
"names_man",
sa.Column("id", sa.UUID(), nullable=False),
sa.Column("name", sa.String(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
op.create_table(
"names_woman",
sa.Column("id", sa.UUID(), nullable=False),
sa.Column("name", sa.String(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table("names_woman")
op.drop_table("names_man")
# ### end Alembic commands ###