/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_PUR_REGSUPPLIER_CITY', 'T_PUR_REGSUPPLIER_CITY', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_PUR_REGSUPPLIER_CITY_FID') CREATE INDEX T_PUR_REGSUPPLIER_CITY_FID ON T_PUR_REGSUPPLIER_CITY ( FENTRYID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_T_PUR_REGSUPPLYSCOPE', 'T_PUR_REGSUPPLYSCOPE', 'FENTRYID', '1';

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


EXEC p_DropIdx 'T_PUR_REGSUPPLIER_PROV_FID', 'T_PUR_REGSUPPLIER_PROV';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'T_PUR_REGSUPPLIER_PROV_FID') CREATE INDEX T_PUR_REGSUPPLIER_PROV_FID ON T_PUR_REGSUPPLIER_PROV ( FENTRYID ,FBASEDATAID );


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