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

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


 EXEC P_ALTERPK 'PK_SRC_BIDSCHEMECHGENTRY', 'T_SRC_BIDSCHEMECHGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENSCHEME', 'T_SRC_OPENSCHEME', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENSCHEME_L', 'T_SRC_OPENSCHEME_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENSOURCETYPE', 'T_SRC_OPENSOURCETYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENSOURCEFLOW', 'T_SRC_OPENSOURCEFLOW', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_OPENROLE', 'T_SRC_OPENROLE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_ENCRYPTROLE', 'T_SRC_ENCRYPTROLE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_BIDDOC_CHG', 'T_SRC_BIDDOC_CHG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_BIDDOC_CHG_FBILLNO') CREATE INDEX IDX_SRC_BIDDOC_CHG_FBILLNO ON T_SRC_BIDDOC_CHG ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_BIDDOC_CHG_FENTITYKEY') CREATE INDEX IDX_SRC_BIDDOC_CHG_FENTITYKEY ON T_SRC_BIDDOC_CHG ( FENTITYKEY );

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


 EXEC P_ALTERPK 'PK_SRC_BIDDOCENTRY_CHG', 'T_SRC_BIDDOCENTRY_CHG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_BIDDOCENTRY_CHG_FJ', 'T_SRC_BIDDOCENTRY_CHG_FJ', 'FPKID', '1';

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



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