/**Begin C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT', 'T_SRC_PROJECT_EXT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_PID') CREATE INDEX IDX_SRC_PROJECT_EXT_PID ON T_SRC_PROJECT_EXT ( FPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_SID') CREATE INDEX IDX_SRC_PROJECT_EXT_SID ON T_SRC_PROJECT_EXT ( FSOURCEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_FID') CREATE INDEX IDX_SRC_PROJECT_EXT_FID ON T_SRC_PROJECT_EXT ( FSRCTYPEID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_A', 'T_SRC_PROJECT_EXT_A', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_A_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_A_CID ON T_SRC_PROJECT_EXT_A ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_Y', 'T_SRC_PROJECT_EXT_Y', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_Y_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_Y_CID ON T_SRC_PROJECT_EXT_Y ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_X', 'T_SRC_PROJECT_EXT_X', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_X_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_X_CID ON T_SRC_PROJECT_EXT_X ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_W', 'T_SRC_PROJECT_EXT_W', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_W_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_W_CID ON T_SRC_PROJECT_EXT_W ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_V', 'T_SRC_PROJECT_EXT_V', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_V_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_V_CID ON T_SRC_PROJECT_EXT_V ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_T', 'T_SRC_PROJECT_EXT_T', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_T_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_T_CID ON T_SRC_PROJECT_EXT_T ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_S', 'T_SRC_PROJECT_EXT_S', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_S_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_S_CID ON T_SRC_PROJECT_EXT_S ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_R', 'T_SRC_PROJECT_EXT_R', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_R_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_R_CID ON T_SRC_PROJECT_EXT_R ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_Q', 'T_SRC_PROJECT_EXT_Q', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_Q_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_Q_CID ON T_SRC_PROJECT_EXT_Q ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_P', 'T_SRC_PROJECT_EXT_P', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_P_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_P_CID ON T_SRC_PROJECT_EXT_P ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_O', 'T_SRC_PROJECT_EXT_O', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_O_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_O_CID ON T_SRC_PROJECT_EXT_O ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_N', 'T_SRC_PROJECT_EXT_N', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_N_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_N_CID ON T_SRC_PROJECT_EXT_N ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_M', 'T_SRC_PROJECT_EXT_M', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_M_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_M_CID ON T_SRC_PROJECT_EXT_M ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_K', 'T_SRC_PROJECT_EXT_K', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_K_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_K_CID ON T_SRC_PROJECT_EXT_K ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_J', 'T_SRC_PROJECT_EXT_J', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_J_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_J_CID ON T_SRC_PROJECT_EXT_J ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_I', 'T_SRC_PROJECT_EXT_I', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_I_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_I_CID ON T_SRC_PROJECT_EXT_I ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_H', 'T_SRC_PROJECT_EXT_H', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_H_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_H_CID ON T_SRC_PROJECT_EXT_H ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_G', 'T_SRC_PROJECT_EXT_G', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_G_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_G_CID ON T_SRC_PROJECT_EXT_G ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_F', 'T_SRC_PROJECT_EXT_F', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_F_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_F_CID ON T_SRC_PROJECT_EXT_F ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_E', 'T_SRC_PROJECT_EXT_E', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_E_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_E_CID ON T_SRC_PROJECT_EXT_E ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_D', 'T_SRC_PROJECT_EXT_D', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_D_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_D_CID ON T_SRC_PROJECT_EXT_D ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_C', 'T_SRC_PROJECT_EXT_C', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_C_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_C_CID ON T_SRC_PROJECT_EXT_C ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_B', 'T_SRC_PROJECT_EXT_B', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_B_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_B_CID ON T_SRC_PROJECT_EXT_B ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_Z', 'T_SRC_PROJECT_EXT_Z', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_PROJECT_EXT_Z_CID') CREATE INDEX IDX_SRC_PROJECT_EXT_Z_CID ON T_SRC_PROJECT_EXT_Z ( FCREATORID );


 EXEC P_ALTERPK 'PK_SRC_PROJECT_EXT_L', 'T_SRC_PROJECT_EXT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_RETENDER', 'T_SRC_RETENDER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_RETENDER_PID') CREATE INDEX IDX_SRC_RETENDER_PID ON T_SRC_RETENDER ( FPARENTID );


 EXEC P_ALTERPK 'PK_SRC_RETENDERENTRY', 'T_SRC_RETENDERENTRY', 'FENTRYID', '1';

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



/**End C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
