From c3f97f8dcacab1988236e80d374a416af58c144f Mon Sep 17 00:00:00 2001 From: DanielS Date: Thu, 9 Jul 2026 23:43:12 +0200 Subject: [PATCH] fix: add missing type and payment_method columns to orders table --- .../migrations/20260709234500_add_type_to_orders.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 shop/supabase/migrations/20260709234500_add_type_to_orders.sql diff --git a/shop/supabase/migrations/20260709234500_add_type_to_orders.sql b/shop/supabase/migrations/20260709234500_add_type_to_orders.sql new file mode 100644 index 0000000..6096d21 --- /dev/null +++ b/shop/supabase/migrations/20260709234500_add_type_to_orders.sql @@ -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';