-- 算法注册配置，业务方案配置以及计算方案配置新增所属应用
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_ALGOREGISTER' AND KSQL_COL_NAME ='FFIELDTYPE') 
ALTER TABLE T_MRP_ALGOREGISTER ADD (FFIELDTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_BUSINESSPLAN' AND KSQL_COL_NAME ='FFIELDTYPE') 
ALTER TABLE T_MRP_BUSINESSPLAN ADD (FFIELDTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALPLANCONFIG' AND KSQL_COL_NAME ='FFIELDTYPE') 
ALTER TABLE T_MRP_CALPLANCONFIG ADD (FFIELDTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );