/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_WHITEBILL', 'T_EB_WHITEBILL', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_WHITECHANGELOG', 'T_EB_WHITECHANGELOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_WHITELOG_P1') CREATE INDEX IDX_EB_WHITELOG_P1 ON T_EB_WHITECHANGELOG ( FUSER );


 EXEC P_ALTERPK 'PK_T_EB_CURRENCYCONVERTLOG', 'T_EB_CURRENCYCONVERTLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CURRENCYCONVERTLOG_P1') CREATE INDEX IDX_EB_CURRENCYCONVERTLOG_P1 ON T_EB_CURRENCYCONVERTLOG ( FMODELID );


 EXEC P_ALTERPK 'PK_T_EB_CURRENCYCONVERTLIST', 'T_EB_CURRENCYCONVERTLIST', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CURRENCYCONVERTSCHEM', 'T_EB_CURRENCYCONVERTSCHEM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CURRENCYCONVERTSCHEM_P1') CREATE INDEX IDX_EB_CURRENCYCONVERTSCHEM_P1 ON T_EB_CURRENCYCONVERTSCHEM ( FMODELID );


 EXEC P_ALTERPK 'PK_T_EB_REPORTATTACHMENT_L', 'T_EB_REPORTATTACHMENT_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_REPORTATTACHMENT_L_P1') CREATE INDEX IDX_EB_REPORTATTACHMENT_L_P1 ON T_EB_REPORTATTACHMENT_L ( FID ,FLOCALEID );



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