-- 修改字段开始
DROP PROCEDURE IF EXISTS pro_AddColumn;
CREATE PROCEDURE pro_AddColumn() BEGIN

IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='siger_project_toollife_tool' AND COLUMN_NAME='image_name') THEN
ALTER TABLE siger_project_toollife_tool ADD COLUMN image_name varchar(200) DEFAULT '' COMMENT '附件名称';
END IF;

END;
CALL pro_AddColumn;
DROP PROCEDURE pro_AddColumn;





ALTER TABLE siger_project_toollife_tech_tool MODIFY COLUMN down_length varchar(200);
ALTER TABLE siger_project_toollife_tech_tool MODIFY COLUMN down_tolerance varchar(200) DEFAULT '';
ALTER TABLE siger_project_toollife_tech_tool MODIFY COLUMN reach_length varchar(200) DEFAULT '';
ALTER TABLE siger_project_toollife_tech_tool MODIFY COLUMN upper_tolerance varchar(200) DEFAULT '';
ALTER TABLE siger_project_toollife_tech_tool MODIFY COLUMN rated_life varchar(200) DEFAULT '';

2020-9-2更新

alter table siger_project_toollife_tool_config drop column tool_id1;
alter table siger_project_toollife_tool_config drop column tool_id2;
alter table siger_project_toollife_tool_config drop column handle_id1;
alter table siger_project_toollife_tool_config drop column handle_id2;
alter table siger_project_toollife_tool_config drop column attachment_id1;
alter table siger_project_toollife_tool_config drop column attachment_id2;
alter table siger_project_toollife_tool_config drop column cut_id1;
alter table siger_project_toollife_tool_config drop column cut_id2;
alter table siger_project_toollife_tool_config drop column cut_id3;
alter table siger_project_toollife_tool_config drop column cut_id4;
ALTER TABLE siger_project_toollife_tool_config ADD COLUMN tool_id int(22) DEFAULT '0' COMMENT '刀具id';
ALTER TABLE siger_project_toollife_detection MODIFY COLUMN standard_values varchar(100) DEFAULT '';
ALTER TABLE siger_project_toollife_detection_detail MODIFY COLUMN standard_values varchar(100) DEFAULT '';
ALTER TABLE siger_project_toollife_tool_install ADD COLUMN install_code varchar(100) DEFAULT '' COMMENT 'install_code';
ALTER TABLE siger_project_toollife_tool_replace_return ADD COLUMN install_code varchar(100) DEFAULT '' COMMENT 'install_code';

2020-9-9

ALTER TABLE siger_project_toollife_workorder ADD COLUMN tool_code varchar(100) DEFAULT '' COMMENT '刀具号';


2020-9-16
ALTER TABLE siger_project_toollife_tool_install ADD COLUMN material_id int(11) DEFAULT '0' COMMENT '物料id';
ALTER TABLE siger_project_toollife_tool_choice_summary ADD COLUMN serial_no varchar(100) DEFAULT '' COMMENT '入库序号';
ALTER TABLE siger_project_toollife_tool ADD COLUMN need_detection int(22) DEFAULT '0' COMMENT '是否需要检测';

ALTER TABLE siger_wms_stock_access_order ADD COLUMN accessWo varchar(100) DEFAULT '' COMMENT 'guid';
ALTER TABLE siger_wms_stock_access_order_detail ADD COLUMN accessWo varchar(100) DEFAULT '' COMMENT 'guid';
