invoices, order handling, db updates
This commit is contained in:
47
alembic/versions/ac19c319304a_invoices_creation.py
Normal file
47
alembic/versions/ac19c319304a_invoices_creation.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""invoices creation
|
||||
|
||||
Revision ID: ac19c319304a
|
||||
Revises: 2c9553f99e03
|
||||
Create Date: 2026-02-14 22:20:47.308942
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "ac19c319304a"
|
||||
down_revision: Union[str, Sequence[str], None] = "2c9553f99e03"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
"""Upgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"invoices",
|
||||
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
|
||||
sa.Column("creator_id", sa.BIGINT(), nullable=False),
|
||||
sa.Column("amount", sa.BIGINT(), nullable=False),
|
||||
sa.Column(
|
||||
"status",
|
||||
sa.Enum("PENDING", "PAID", "EXPIRED", name="invoicestatus"),
|
||||
nullable=False,
|
||||
),
|
||||
sa.Column("inline_message_id", sa.BIGINT(), nullable=True),
|
||||
sa.Column(
|
||||
"created_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False
|
||||
),
|
||||
sa.PrimaryKeyConstraint("id"),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("invoices")
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user