/**Begin D:\PDM_UPGRADE\PDM1\HAOS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HAOS_STRUCTPROJECT', 'T_HAOS_STRUCTPROJECT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HAOS_STRUCTPROJECT_L', 'T_HAOS_STRUCTPROJECT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HAOS_STRUCTPROCONFIG', 'T_HAOS_STRUCTPROCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_STRUCTPROCONFIG') CREATE INDEX IDX_HAOS_STRUCTPROCONFIG ON T_HAOS_STRUCTPROCONFIG ( FENTITYTYPEID );


 EXEC P_ALTERPK 'PK_HAOS_STRPROFIELDENTRY', 'T_HAOS_STRPROFIELDENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HAOS_STRPROJECTENTRY', 'T_HAOS_STRPROJECTENTRY', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_STRPROJECTENTRY_FID') CREATE INDEX IDX_HAOS_STRPROJECTENTRY_FID ON T_HAOS_STRPROJECTENTRY ( FENTRYID );


 EXEC P_ALTERPK 'PK_HAOS_STRPROFIELDENTRY_L', 'T_HAOS_STRPROFIELDENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_STRPROFIELDENTRY_L') CREATE INDEX IDX_HAOS_STRPROFIELDENTRY_L ON T_HAOS_STRPROFIELDENTRY_L ( FLOCALEID );

 EXEC P_ALTERPK 'PK_HAOS_STRCONOTCLASSIFY', 'T_HAOS_STRCONOTCLASSIFY', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HAOS_STRCONOTCLASSIFY') CREATE INDEX IDX_HAOS_STRCONOTCLASSIFY ON T_HAOS_STRCONOTCLASSIFY ( FBASEDATAID );

/**End D:\PDM_UPGRADE\PDM1\HAOS_constraint.sql **/
