- payple-renew: 만료 구독 조회 → paypleBilling → 기간 갱신 - 3회 연속 실패 시 tier=free, status=expired 다운그레이드 - migration: subscriptions.renewal_failures 컬럼 추가 - payple-webhook: 결제 완료 시 renewal_failures=0 리셋 - GitHub Actions: 매일 01:00 UTC 스케줄
5 lines
257 B
SQL
5 lines
257 B
SQL
-- Phase 3.2-B: Payple 정기 갱신 실패 카운터
|
|
-- payple-renew Edge Function이 갱신 실패 시 카운트, 3회 초과 시 다운그레이드
|
|
|
|
ALTER TABLE public.subscriptions
|
|
ADD COLUMN IF NOT EXISTS renewal_failures integer NOT NULL DEFAULT 0;
|