-- 工单汇报单：备注 remark
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERREPORT' AND KSQL_COL_NAME ='FREMARK') 
 ALTER TABLE T_POM_MFTORDERREPORT ADD (FREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL );

-- 生产组件清单（组件明细）：备注 childremarks、安装位置 setuplocation
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY' AND KSQL_COL_NAME ='FCHILDREMARKS') 
 ALTER TABLE T_POM_MANUSTOCKENTRY ADD (FCHILDREMARKS NVARCHAR(250) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MANUSTOCKENTRY' AND KSQL_COL_NAME ='FSETUPLOCATION') 
 ALTER TABLE T_POM_MANUSTOCKENTRY ADD (FSETUPLOCATION NVARCHAR(100) DEFAULT ' ' NOT NULL );
-- 生产组件清单变更单（组件明细）：备注 childremarks、安装位置 setuplocation
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMANUSTOCKENTRY' AND KSQL_COL_NAME ='FCHILDREMARKS') 
 ALTER TABLE T_POM_XMANUSTOCKENTRY ADD (FCHILDREMARKS NVARCHAR(250) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMANUSTOCKENTRY' AND KSQL_COL_NAME ='FSETUPLOCATION') 
 ALTER TABLE T_POM_XMANUSTOCKENTRY ADD (FSETUPLOCATION NVARCHAR(100) DEFAULT ' ' NOT NULL );
-- 检修组件清单（组件明细）：备注 childremarks、安装位置 setuplocation
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROSTOCKENTRY' AND KSQL_COL_NAME ='FCHILDREMARKS') 
 ALTER TABLE T_POM_MROSTOCKENTRY ADD (FCHILDREMARKS NVARCHAR(250) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MROSTOCKENTRY' AND KSQL_COL_NAME ='FSETUPLOCATION') 
 ALTER TABLE T_POM_MROSTOCKENTRY ADD (FSETUPLOCATION NVARCHAR(100) DEFAULT ' ' NOT NULL );
 
-- 调拨计划方案定义：名称 name
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_PLANPROGRAM' AND KSQL_COL_NAME ='FNAME') 
 ALTER TABLE T_POM_PLANPROGRAM ADD (FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL );
