-- 优先级类型、模型、定义新增所属应用
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_PDEFINE' AND KSQL_COL_NAME ='FFIELDTYPE')
ALTER TABLE T_MSPLAN_PDEFINE ADD (FFIELDTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );

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

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