IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_FIELDMAPPING' AND KSQL_COL_NAME IN ('FSYNC'))
 ALTER TABLE T_FPM_FIELDMAPPING ADD (FSYNC CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_FIELDMAPPING' AND KSQL_COL_NAME IN ('FSYNCPROP')) 
 ALTER TABLE T_FPM_FIELDMAPPING ADD (FSYNCPROP NVARCHAR(2000) DEFAULT ' ' NOT NULL );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_INOUTCOLLECT' AND KSQL_COL_NAME IN ('FREPEATCOLLECT')) 
 ALTER TABLE T_FPM_INOUTCOLLECT ADD (FREPEATCOLLECT CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_INOUTCOLLECT' AND KSQL_COL_NAME IN ('FDISCARD')) 
 ALTER TABLE T_FPM_INOUTCOLLECT ADD (FDISCARD CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_INOUTCOLLECT' AND KSQL_COL_NAME IN ('FVERSION'))
 ALTER TABLE T_FPM_INOUTCOLLECT ADD (FVERSION INT DEFAULT 0 NOT NULL );
