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

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


 EXEC P_ALTERPK 'PK_POM_PLANPROGRAM_DISTR', 'T_POM_PLANPROGRAM_DISTR', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_POM_PLANPROGRAM_DISTR_L', 'T_POM_PLANPROGRAM_DISTR_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_POM_PLANPROORGENTRYDIS', 'T_POM_PLANPROORGENTRYDIS', 'FENTRYID', '1';

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



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