feat(orders): integrate Pally payment and order management
This commit is contained in:
42
alembic/versions/e237f7c5cb9a_invoice_table.py
Normal file
42
alembic/versions/e237f7c5cb9a_invoice_table.py
Normal file
@@ -0,0 +1,42 @@
|
||||
"""+invoice table
|
||||
|
||||
Revision ID: e237f7c5cb9a
|
||||
Revises: bb542353b092
|
||||
Create Date: 2026-07-31 11:45:00.530489
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'e237f7c5cb9a'
|
||||
down_revision: Union[str, Sequence[str], None] = 'bb542353b092'
|
||||
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.FLOAT(), nullable=False),
|
||||
sa.Column('status', sa.Enum('EXPIRED', 'ACTIVE', 'PAID', name='invoicestatus'), nullable=False),
|
||||
sa.ForeignKeyConstraint(['creator_id'], ['users.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('id')
|
||||
)
|
||||
op.create_unique_constraint(None, 'addons', ['id'])
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
"""Downgrade schema."""
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_constraint(None, 'addons', type_='unique')
|
||||
op.drop_table('invoices')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user