-- Update payment status constraints to include all defined statuses
ALTER TABLE orders DROP CONSTRAINT IF EXISTS orders_payment_status_check;
ALTER TABLE orders ADD CONSTRAINT orders_payment_status_check CHECK (payment_status IN ('pending', 'partial', 'completed', 'failed', 'refunded', 'partial-refunded')); 