/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_EB_COPYRECORDDT', 'T_EB_COPYRECORDDT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_COPYRECORDP', 'T_EB_COPYRECORDP', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_VERSIONCOPYRECORD', 'T_EB_VERSIONCOPYRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_VERSIONCOPYRECORD_P1') CREATE INDEX IDX_EB_VERSIONCOPYRECORD_P1 ON T_EB_VERSIONCOPYRECORD ( FMODELID ,FSTATUS );


 EXEC P_ALTERPK 'PK_T_EB_COPYRECORDTRIAL', 'T_EB_COPYRECORDTRIAL', 'FENTRYID', '1';

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



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