/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
EXEC p_DropIdx 'INDEX_T_EB_SchemeEntry_number', 'T_EB_SCHEMEENTRY';
EXEC p_DropIdx 'INDEX_T_EB_SchemeEntry_SCHEMECATALOG', 'T_EB_SCHEMEENTRY';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEMEENTRY_NUMBER') CREATE INDEX IDX_EB_SCHEMEENTRY_NUMBER ON T_EB_SCHEMEENTRY ( FNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEMEENTRY_CATALOG') CREATE INDEX IDX_EB_SCHEMEENTRY_CATALOG ON T_EB_SCHEMEENTRY ( FSCHEMECATALOG );

 EXEC P_ALTERPK 'PK_T_EB_FORMULAREFER', 'T_EB_FORMULAREFER', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_FORMULAREFER_FID') CREATE INDEX IDX_EB_FORMULAREFER_FID ON T_EB_FORMULAREFER( FID );



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