feat(migration): 添加代购和强充配置字段迁移

This commit is contained in:
2026-01-31 11:31:42 +08:00
parent e461791a0e
commit f6a0f0f39c
4 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
-- 回滚: 删除 tb_order 表的 is_purchase_on_behalf 字段
ALTER TABLE tb_order DROP COLUMN IF EXISTS is_purchase_on_behalf;

View File

@@ -0,0 +1,6 @@
-- 为 tb_order 表添加代购标志字段
-- 用于标识订单是否为代购订单
ALTER TABLE tb_order ADD COLUMN is_purchase_on_behalf BOOLEAN DEFAULT false;
COMMENT ON COLUMN tb_order.is_purchase_on_behalf IS '是否为代购订单';

View File

@@ -0,0 +1,4 @@
-- 回滚: 删除 tb_shop_series_allocation 表的强充配置字段
ALTER TABLE tb_shop_series_allocation DROP COLUMN IF EXISTS enable_force_recharge;
ALTER TABLE tb_shop_series_allocation DROP COLUMN IF EXISTS force_recharge_amount;

View File

@@ -0,0 +1,8 @@
-- 为 tb_shop_series_allocation 表添加强充配置字段
-- 用于支持强制充值功能
ALTER TABLE tb_shop_series_allocation ADD COLUMN enable_force_recharge BOOLEAN DEFAULT false;
ALTER TABLE tb_shop_series_allocation ADD COLUMN force_recharge_amount BIGINT DEFAULT 0;
COMMENT ON COLUMN tb_shop_series_allocation.enable_force_recharge IS '是否启用强制充值';
COMMENT ON COLUMN tb_shop_series_allocation.force_recharge_amount IS '强制充值金额(分)';