feat(payments): reuse pending provider payments
This commit is contained in:
@@ -1155,6 +1155,13 @@ def _migration_0035_add_subscription_promo_expiry_flag(connection: Connection) -
|
||||
)
|
||||
|
||||
|
||||
def _migration_0036_add_provider_payment_url(connection: Connection) -> None:
|
||||
inspector = inspect(connection)
|
||||
columns: Set[str] = {col["name"] for col in inspector.get_columns("payments")}
|
||||
if "provider_payment_url" not in columns:
|
||||
connection.execute(text("ALTER TABLE payments ADD COLUMN provider_payment_url VARCHAR"))
|
||||
|
||||
|
||||
MIGRATIONS: List[Migration] = [
|
||||
Migration(
|
||||
id="0001_add_channel_subscription_fields",
|
||||
@@ -1342,6 +1349,11 @@ MIGRATIONS: List[Migration] = [
|
||||
description="Suppress multi-day expiry reminders for trial and bonus subscriptions",
|
||||
upgrade=_migration_0035_add_subscription_promo_expiry_flag,
|
||||
),
|
||||
Migration(
|
||||
id="0036_add_provider_payment_url",
|
||||
description="Persist provider payment links for reusable pending payments",
|
||||
upgrade=_migration_0036_add_provider_payment_url,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user