/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PDM_constraint.sql **/
 EXEC P_ALTERPK 'PK_PDM_MANUVERSION', 'T_PDM_MANUVERSION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MANUV_FBILLNO') CREATE INDEX IDX_PDM_MANUV_FBILLNO ON T_PDM_MANUVERSION ( FNUMBER );


 EXEC P_ALTERPK 'PK_PDM_MANUVERSION_L', 'T_PDM_MANUVERSION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_PDM_MANUVERSIONENTRY', 'T_PDM_MANUVERSIONENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_PDM_MANUVERSIONTRACK', 'T_PDM_MANUVERSIONTRACK', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PDM_MVET_FTRACK') CREATE INDEX IDX_PDM_MVET_FTRACK ON T_PDM_MANUVERSIONTRACK ( FENTRYID );



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