Add database migration for crypto payment refund tracking columns
Adds refund_reason, refund_tx_hash, and refund_amount columns to the mps_crypto_payment table to enable comprehensive tracking of refund operations for out-of-stock scenarios and payment error handling.
This commit is contained in:
parent
c4d9192540
commit
a2d471e4e8
1 changed files with 32 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
"""Add refund tracking columns to crypto_payment
|
||||
|
||||
Revision ID: 5bbb5df5bf1b
|
||||
Revises: 0f59018f6537
|
||||
Create Date: 2025-09-24 09:51:53.586990
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '5bbb5df5bf1b'
|
||||
down_revision = '0f59018f6537'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
from make_post_sell.models.meta import UUIDType
|
||||
|
||||
|
||||
def upgrade():
|
||||
# Add refund tracking columns to crypto_payment table
|
||||
op.add_column('mps_crypto_payment', sa.Column('refund_reason', sa.UnicodeText(), nullable=True))
|
||||
op.add_column('mps_crypto_payment', sa.Column('refund_tx_hash', sa.Unicode(128), nullable=True))
|
||||
op.add_column('mps_crypto_payment', sa.Column('refund_amount', sa.BigInteger(), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
# Remove refund tracking columns from crypto_payment table
|
||||
op.drop_column('mps_crypto_payment', 'refund_amount')
|
||||
op.drop_column('mps_crypto_payment', 'refund_tx_hash')
|
||||
op.drop_column('mps_crypto_payment', 'refund_reason')
|
||||
Loading…
Add table
Add a link
Reference in a new issue