/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_SUPINVALIDENTRY', 'T_SRC_SUPINVALIDENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPINVALIDENTRY_EID') CREATE INDEX IDX_SRC_SUPINVALIDENTRY_EID ON T_SRC_SUPINVALIDENTRY ( FSRCENTRYID );

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


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERINVALID', 'T_SRC_SUPPLIERINVALID', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERINVALID_COMP') CREATE INDEX IDX_SRC_SUPPLIERINVALID_COMP ON T_SRC_SUPPLIERINVALID ( FPARENTID ,FPENTITYKEY ,FENTITYKEY );



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