/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FMODEL') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FMODEL VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FASSETUNITID') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FASSETUNITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FREMARK') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FREMARK VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FPICTUREPATH') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FPICTUREPATH VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FDEPREMETHODID') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FDEPREMETHODID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FCURRENCYID') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FCURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FCURRENCYRATE') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FCURRENCYRATE DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSETSPLITENTRY_D' AND KSQL_COL_NAME ='FDEPREDAMOUNT') 
 ALTER TABLE T_FA_ASSETSPLITENTRY_D ADD (FDEPREDAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );

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