/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_REQUESTRECORD' AND KSQL_COL_NAME ='FTRACKID') 
 ALTER TABLE T_MDS_REQUESTRECORD ADD (FTRACKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_REQUESTRECORD' AND KSQL_COL_NAME ='FCONFIGID') 
 ALTER TABLE T_MDS_REQUESTRECORD ADD (FCONFIGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_FNREPORTBK' AND KSQL_COL_NAME ='FTRACKID') 
 ALTER TABLE T_MDS_FNREPORTBK ADD (FTRACKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_FNREPORTBK' AND KSQL_COL_NAME ='FCONFIGID') 
 ALTER TABLE T_MDS_FNREPORTBK ADD (FCONFIGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_FNREPORT' AND KSQL_COL_NAME ='FTRACKID') 
 ALTER TABLE T_MDS_FNREPORT ADD (FTRACKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_FNREPORT' AND KSQL_COL_NAME ='FCONFIGID') 
 ALTER TABLE T_MDS_FNREPORT ADD (FCONFIGID BIGINT DEFAULT 0 NOT NULL );

/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_table.sql **/
