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

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

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

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

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

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

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


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

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

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


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

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


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