-- 计划方案增加字段：自动投放订单类型、投放失败发送通知
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANPROGRAM' AND KSQL_COL_NAME ='FDROPORDERTYPE')
ALTER TABLE T_MRP_PLANPROGRAM ADD (FDROPORDERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANPROGRAM' AND KSQL_COL_NAME ='FSENDDROPFAILMSG')
ALTER TABLE T_MRP_PLANPROGRAM ADD (FSENDDROPFAILMSG CHAR(1) DEFAULT '0' NOT NULL );