/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TPO_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_DOWNLOAD_HISTORY' AND KSQL_COL_NAME ='FSOURSERULE') 
 ALTER TABLE T_TPO_DOWNLOAD_HISTORY ADD (FSOURSERULE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_DOWNLOAD_HISTORY' AND KSQL_COL_NAME ='FTARGETRULE') 
 ALTER TABLE T_TPO_DOWNLOAD_HISTORY ADD (FTARGETRULE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TPO_DOWNLOAD_HISTORY' AND KSQL_COL_NAME ='FISSUCCESS') 
 ALTER TABLE T_TPO_DOWNLOAD_HISTORY ADD (FISSUCCESS CHAR(1) DEFAULT '1' NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TPO_table.sql **/
