-- 租赁-付款计划
/**Begin D:\PDM_UPGRADE\PDM1\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_LEASE_PAY_PLAN' AND KSQL_COL_NAME IN ('FREALPAYAMOUNT'))
ALTER TABLE T_FA_LEASE_PAY_PLAN ADD (FREALPAYAMOUNT DECIMAL(19,4) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_LEASE_PAY_PLAN' AND KSQL_COL_NAME IN ('FPLANUNPAY'))
ALTER TABLE T_FA_LEASE_PAY_PLAN ADD (FPLANUNPAY DECIMAL(19,4) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_LEASE_PAY_PLAN' AND KSQL_COL_NAME IN ('FREALUNPAY'))
ALTER TABLE T_FA_LEASE_PAY_PLAN ADD (FREALUNPAY DECIMAL(19,4) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_LEASE_PAY_PLAN' AND KSQL_COL_NAME IN ('FCURRENCYID'))
ALTER TABLE T_FA_LEASE_PAY_PLAN ADD (FCURRENCYID BIGINT DEFAULT 0 NOT NULL );

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