81e08405d5a9_add_payment_table.py 818 B

1234567891011121314151617181920212223242526272829303132
  1. """add payment table
  2. Revision ID: 81e08405d5a9
  3. Revises: 9fea1822cbc9
  4. Create Date: 2021-12-28 13:25:08.168652
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '81e08405d5a9'
  10. down_revision = '9fea1822cbc9'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.create_table('payment',
  15. sa.Column('id', sa.Integer(), nullable=False),
  16. sa.Column('order_id', sa.String(100), nullable=False),
  17. sa.Column('transaction_id', sa.String(200), nullable=False),
  18. sa.Column('payload', sa.Text(), nullable=False),
  19. sa.Column('create_at', sa.String(length=200), nullable=False),
  20. sa.Column('line_id', sa.String(200), nullable=False),
  21. sa.PrimaryKeyConstraint('id')
  22. )
  23. def downgrade():
  24. op.drop_table('payment')