feat(payments): reuse pending provider payments

This commit is contained in:
BADtochka
2026-06-09 14:19:50 +03:00
parent 1362edde42
commit 234fc69505
16 changed files with 992 additions and 79 deletions
+12
View File
@@ -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,
),
]