gasWellWatch/src/main/resources/command_change.sql

16 lines
448 B
MySQL
Raw Normal View History

ALTER TABLE `commands`
MODIFY COLUMN `ref_type` varchar(20) NOT NULL COMMENT '引用类型DEVICE:设备DEVICE_PRODUCT_CODE:设备类型' AFTER `id`;
ALTER TABLE `command_points`
DROP COLUMN `device_id`;
update commands
set ref_type = 'DEVICE_PRODUCT_CODE',
ref_id = 4
where ref_type = 'DEVICE'
and ref_id = 1;
update commands
set ref_type = 'DEVICE_PRODUCT_CODE',
ref_id = 6
where ref_type = 'DEVICE'
and ref_id = 2;