-- 赠送卡按卡类型拆分：新增 6 个细分字段
-- 需求：BOARD-3 赠送卡矩阵需要按酒水卡/台费卡/抵用券展示余额和新增
-- 恒等式：gift_card_balance = gift_liquor_balance + gift_table_fee_balance + gift_voucher_balance
--         recharge_gift     = gift_liquor_recharge + gift_table_fee_recharge + gift_voucher_recharge

ALTER TABLE dws.dws_finance_recharge_summary
    ADD COLUMN IF NOT EXISTS gift_liquor_balance     NUMERIC(14,2) NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS gift_table_fee_balance   NUMERIC(14,2) NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS gift_voucher_balance     NUMERIC(14,2) NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS gift_liquor_recharge     NUMERIC(14,2) NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS gift_table_fee_recharge  NUMERIC(14,2) NOT NULL DEFAULT 0,
    ADD COLUMN IF NOT EXISTS gift_voucher_recharge    NUMERIC(14,2) NOT NULL DEFAULT 0;
