fix: add missing type and payment_method columns to orders table

This commit is contained in:
DanielS
2026-07-09 23:43:12 +02:00
parent 98b1301e96
commit c3f97f8dca

View File

@@ -0,0 +1,7 @@
-- Migration: Add missing type and payment_method columns to orders table
-- Purpose: Ensure physical columns type and payment_method exist on public.orders for checkout split support.
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS type TEXT NOT NULL DEFAULT 'purchase' CHECK (type IN ('purchase', 'subscription'));
ALTER TABLE public.orders ADD COLUMN IF NOT EXISTS payment_method TEXT;
NOTIFY pgrst, 'reload schema';