forked from mtusi2026/mtusi2026lab5
35 lines
904 B
Python
35 lines
904 B
Python
"""add counters
|
|
|
|
Revision ID: abd273076068
|
|
Revises: db06fd3126ff
|
|
Create Date: 2026-10-26 22:01:01.910396
|
|
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision: str = "abd273076068"
|
|
down_revision: Union[str, None] = "db06fd3126ff"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table(
|
|
"counters",
|
|
sa.Column("name", sa.String(length=64), nullable=False),
|
|
sa.Column("value", sa.BigInteger(), nullable=False),
|
|
sa.PrimaryKeyConstraint("name", name=op.f("pk_counters")),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("counters")
|
|
# ### end Alembic commands ###
|