/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\OM_constraint.sql **/
 EXEC P_ALTERPK 'PK_POM_EXWORKREGIS', 'T_POM_EXWORKREGIS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_EXWORKREGIS_FBILLNO') CREATE INDEX IDX_POM_EXWORKREGIS_FBILLNO ON T_POM_EXWORKREGIS ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_EXWORKREGIS_FORGID') CREATE INDEX IDX_POM_EXWORKREGIS_FORGID ON T_POM_EXWORKREGIS ( FORGID );


 EXEC P_ALTERPK 'PK_POM_EXWORKREGISENTRY', 'T_POM_EXWORKREGISENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_POM_EXWORKRENTRY_FIDSEQ') CREATE INDEX IDX_POM_EXWORKRENTRY_FIDSEQ ON T_POM_EXWORKREGISENTRY ( FID ,FSEQ );



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