/**Begin D:\dev\tools\PDM_UPGRADE\pdm1\HAOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HAOS_CHANGEMSG', 'T_HAOS_CHANGEMSG', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_CHANGEMSG_ORG') CREATE INDEX IDX_HAOS_CHANGEMSG_ORG ON T_HAOS_CHANGEMSG ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HAOS_CHANGEMSGENTRY', 'T_HAOS_CHANGEMSGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HAOS_CHANGEMSG_L', 'T_HAOS_CHANGEMSG_L', 'FPKID', '1';

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



/**End D:\dev\tools\PDM_UPGRADE\pdm1\HAOS_constraint.sql **/
