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

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


 EXEC P_ALTERPK 'PK_MDS_PLANDATAFIELDSET', 'T_MDS_PLANDATAFIELDSET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_MDS_PLANDATAFIELDSET_L', 'T_MDS_PLANDATAFIELDSET_L', 'FPKID', '1';

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



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
