Files
app-grosir/supabase/migrations/20240103_add_payment_method.sql
2026-07-23 22:12:32 +07:00

10 lines
394 B
SQL

-- Migration: add payment method fields to sales table
-- Run this in Supabase SQL Editor before using payment features
ALTER TABLE sales
ADD COLUMN IF NOT EXISTS payment_method text NOT NULL DEFAULT 'tunai',
ADD COLUMN IF NOT EXISTS split_payment jsonb;
-- Optional: add index for filtering by payment method
CREATE INDEX IF NOT EXISTS idx_sales_payment_method ON sales(payment_method);