Files
ruoyi-java/sql/add_count_enabled_field.sql
2025-10-23 23:28:16 +08:00

7 lines
379 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 为京东订单表添加统计控制字段
-- 字段说明is_count_enabled 控制是否参与统计0=不参与统计1=参与统计默认为1
ALTER TABLE jd_order ADD COLUMN is_count_enabled TINYINT(1) DEFAULT 1 COMMENT '是否参与统计0否 1是';
-- 为现有数据设置默认值
UPDATE jd_order SET is_count_enabled = 1 WHERE is_count_enabled IS NULL;