-- Remove refund tracking from order items
ALTER TABLE order_items DROP COLUMN IF EXISTS refunded_by;
ALTER TABLE order_items DROP COLUMN IF EXISTS refunded_at;
ALTER TABLE order_items DROP COLUMN IF EXISTS refund_reason;
ALTER TABLE order_items DROP COLUMN IF EXISTS is_fully_refunded;
ALTER TABLE order_items DROP COLUMN IF EXISTS is_partially_refunded;
ALTER TABLE order_items DROP COLUMN IF EXISTS refund_quantity;
ALTER TABLE order_items DROP COLUMN IF EXISTS refund_amount;

-- Remove refund tracking from payments
ALTER TABLE payments DROP COLUMN IF EXISTS refunded_by;
ALTER TABLE payments DROP COLUMN IF EXISTS refunded_at;
ALTER TABLE payments DROP COLUMN IF EXISTS refund_reason;
ALTER TABLE payments DROP COLUMN IF EXISTS refund_amount;

-- Drop payment_order_items table
DROP TABLE IF EXISTS payment_order_items;

-- Remove split payment tracking from payments table
ALTER TABLE payments DROP COLUMN IF EXISTS split_description;
ALTER TABLE payments DROP COLUMN IF EXISTS split_total;
ALTER TABLE payments DROP COLUMN IF EXISTS split_number;
