/**Begin D:\PDM_UPGRADE\PDM1\FA_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FASSETBOOKID'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FASSETBOOKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FCURRENCYRATE'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FCURRENCYRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FORIGINALAMOUNT'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FORIGINALAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FCURRENCYID'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FCURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FINCOMETAX'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FINCOMETAX DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FNETAMOUNT'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FNETAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FBIZPERIODID'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FBIZPERIODID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_ASSET_FINENTRY' AND KSQL_COL_NAME IN ('FASSETCATID'))
ALTER TABLE T_FA_ASSET_FINENTRY ADD (FASSETCATID BIGINT DEFAULT 0 NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\FA_table.sql **/
