/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
EXEC p_DropIdx 'IDX_CAS_AAL_FID', 'T_CAS_ACCOUNTASSIGN_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AAL_FID') CREATE INDEX IDX_CAS_AAL_FID ON T_CAS_ACCOUNTASSIGN_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_AB_FID', 'T_CAS_ACCOUNTBANKS_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AB_FID') CREATE INDEX IDX_CAS_AB_FID ON T_CAS_ACCOUNTBANKS_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_AC_FID', 'T_CAS_ACCOUNTCASHS_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AC_FID') CREATE INDEX IDX_CAS_AC_FID ON T_CAS_ACCOUNTCASHS_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_PBTL_FPID', 'T_CAS_PAYMENTBILLTYPE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PBTL_FPID') CREATE INDEX IDX_CAS_PBTL_FPID ON T_CAS_PAYMENTBILLTYPE_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_RBTL_FPID', 'T_CAS_RECEIVINGBILLTYPE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RBTL_FPID') CREATE INDEX IDX_CAS_RBTL_FPID ON T_CAS_RECEIVINGBILLTYPE_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_APL_FID', 'T_CAS_ACCOUNTPROPERTY_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_APL_FID') CREATE INDEX IDX_CAS_APL_FID ON T_CAS_ACCOUNTPROPERTY_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_JBL_FID', 'T_CAS_JOURNALBALANCE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_JBL_FID') CREATE INDEX IDX_CAS_JBL_FID ON T_CAS_JOURNALBALANCE_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_STL_FID', 'T_CAS_SETTEMPLATE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_STL_FID') CREATE INDEX IDX_CAS_STL_FID ON T_CAS_SETTEMPLATE_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_WBC_L_PK', 'T_CAS_WBCONFIG_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_WBC_L_PK') CREATE INDEX IDX_CAS_WBC_L_PK ON T_CAS_WBCONFIG_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_TL_FID', 'T_CAS_TEMPLATE_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_TL_FID') CREATE INDEX IDX_CAS_TL_FID ON T_CAS_TEMPLATE_L ( FID ,FLOCALEID );

EXEC p_DropIdx 'IDX_CAS_FFL_FPID', 'T_CAS_FUNDFLOWITEM_L';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_FFL_FPID') CREATE INDEX IDX_CAS_FFL_FPID ON T_CAS_FUNDFLOWITEM_L ( FID ,FLOCALEID );


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