/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
 EXEC P_ALTERPK 'PK_MDS_PRODUCTDGENT', 'T_MDS_PRODUCTDGENT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_PRODUCTGROUP', 'T_MDS_PRODUCTGROUP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_PRODUCTGROUP_FMAT') CREATE INDEX IDX_MDS_PRODUCTGROUP_FMAT ON T_MDS_PRODUCTGROUP ( FMATERIAL );


 EXEC P_ALTERPK 'PK_MDS_PRODUCTGROUP_L', 'T_MDS_PRODUCTGROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_ORDERSETOFF', 'T_MDS_ORDERSETOFF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_ORDERSETOFF_ONO') CREATE INDEX IDX_MDS_ORDERSETOFF_ONO ON T_MDS_ORDERSETOFF ( FORDERNO );
 
/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
