/**Begin D:\PDM_UPGRADE\PDM1\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_BALANCEMODEL_CASH', 'T_CAS_BALANCEMODEL_CASH', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BALMODEL_CASH') CREATE UNIQUE INDEX IDX_CAS_BALMODEL_CASH ON T_CAS_BALANCEMODEL_CASH ( FORGID ,FCURRENCYID ,FYEAR ,FMONTH ,FACCOUNTID );


 EXEC P_ALTERPK 'PK_T_CAS_BALANCEMODEL_JOURNA', 'T_CAS_BALANCEMODEL_JOURNA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BALMODEL_JOURNAL') CREATE UNIQUE INDEX IDX_CAS_BALMODEL_JOURNAL ON T_CAS_BALANCEMODEL_JOURNA ( FORGID ,FCURRENCYID ,FYEAR ,FMONTH ,FACCOUNTID );


 EXEC P_ALTERPK 'PK_T_CAS_BALANCEMODEL_STATE', 'T_CAS_BALANCEMODEL_STATE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_BALMODLE_STATE') CREATE UNIQUE INDEX IDX_CAS_BALMODLE_STATE ON T_CAS_BALANCEMODEL_STATE ( FORGID ,FCURRENCYID ,FYEAR ,FMONTH ,FACCOUNTID );



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