-- Add split_type column to payments table
ALTER TABLE payments ADD COLUMN split_type VARCHAR(20);

-- Add index for better query performance
CREATE INDEX idx_payments_split_type ON payments(split_type);

-- Add constraint to ensure split_type is valid
ALTER TABLE payments ADD CONSTRAINT check_split_type_valid CHECK (split_type IS NULL OR split_type IN ('AMOUNT', 'ITEM')); 