veza/veza-backend-api/migrations/080_add_payment_fields.sql

10 lines
458 B
MySQL
Raw Normal View History

-- Add Hyperswitch payment fields to orders table (if it exists)
-- The orders table is created by Hyperswitch/payments profile; skip if not present
DO $$
BEGIN
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'orders') THEN
ALTER TABLE orders ADD COLUMN IF NOT EXISTS hyperswitch_payment_id TEXT;
ALTER TABLE orders ADD COLUMN IF NOT EXISTS payment_status TEXT DEFAULT 'pending';
END IF;
END $$;