-- 版本V35升级V40脚本 ---2023年5月

-- 修改计划表名称
RENAME TABLE D_M_PLAN TO D_INOUT_PLAN
RENAME TABLE D_M_PLAN_DETAIL TO D_INOUT_PLAN_DETAIL;

--修改合同信息
RENAME TABLE D_M_CONTRACT TO D_INOUT_CONTRACT;

--性质变更
RENAME TABLE D_M_VARIETY_CHANGE TO D_INOUT_VARIETY_CHANGE;

--质量管理-检验类型升级--待配置
UPDATE D_M_QUALITY SET TYPE_ = '', WHERE TYPE_ ='';

UPDATE D_M_QUALITY SET STANDARD_ = '1', WHERE STANDARD_ ='01';
UPDATE D_M_QUALITY SET STANDARD_ = '0', WHERE STANDARD_ ='02';

-- 损溢表
RENAME TABLE D_M_LOSS_OVER TO D_INOUT_LOSS_OVER;

-- 倒仓
RENAME TABLE D_M_STOCK_CHANGE TO D_INOUT_STOCK_CHANGE;

--客户信用
RENAME TABLE D_CREDIT TO D_INTOU_CREDIT;