/**Begin C:\PDM_UPGRADE\PDM1\SRC_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRC_SCHEMEBIZTYPE', 'T_SRC_SCHEMEBIZTYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SCHEMEPERIOD', 'T_SRC_SCHEMEPERIOD', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATE', 'T_SRC_EVALUATE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATETPL', 'T_SRC_EVALUATETPL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_GRADE', 'T_SRC_GRADE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_GRADEENTRY', 'T_SRC_GRADEENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATECONFIGHEAD', 'T_SRC_EVALUATECONFIGHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATECONFIG', 'T_SRC_EVALUATECONFIG', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATECONFIG_PID') CREATE INDEX IDX_SRC_EVALUATECONFIG_PID ON T_SRC_EVALUATECONFIG ( FENTRYPARENTID );


 EXEC P_ALTERPK 'PK_SRC_EVALUATECONFIG_FJ', 'T_SRC_EVALUATECONFIG_FJ', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATESCORER', 'T_SRC_EVALUATESCORER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_GRADE_L', 'T_SRC_GRADE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATEEXPERTHEAD', 'T_SRC_EVALUATEEXPERTHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATEEXPERT', 'T_SRC_EVALUATEEXPERT', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATEEXPERT_PID') CREATE INDEX IDX_SRC_EVALUATEEXPERT_PID ON T_SRC_EVALUATEEXPERT ( FENTRYPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATEEXPERT_SID') CREATE INDEX IDX_SRC_EVALUATEEXPERT_SID ON T_SRC_EVALUATEEXPERT ( FSUPPLIERID );


 EXEC P_ALTERPK 'PK_SRC_EVALUATEDETAILHEAD', 'T_SRC_EVALUATEDETAILHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATEOPINIONHEAD', 'T_SRC_EVALUATEOPINIONHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATEOPINION', 'T_SRC_EVALUATEOPINION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATEOPINION_TID') CREATE INDEX IDX_SRC_EVALUATEOPINION_TID ON T_SRC_EVALUATEOPINION ( FSCORETASKID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATEOPINION_SID') CREATE INDEX IDX_SRC_EVALUATEOPINION_SID ON T_SRC_EVALUATEOPINION ( FSCORERID );


 EXEC P_ALTERPK 'PK_SRC_OPINION_FJ', 'T_SRC_OPINION_FJ', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_EVALUATERESULTHEAD', 'T_SRC_EVALUATERESULTHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_SRC_EVALUATERESULT', 'T_SRC_EVALUATERESULT', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATERESULT_PID') CREATE INDEX IDX_SRC_EVALUATERESULT_PID ON T_SRC_EVALUATERESULT ( FENTRYPARENTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATERESULT_SID') CREATE INDEX IDX_SRC_EVALUATERESULT_SID ON T_SRC_EVALUATERESULT ( FSCORETASKID );


 EXEC P_ALTERPK 'PK_SRC_EVALUATETASK', 'T_SRC_EVALUATETASK', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATETASK_PROJECTID') CREATE INDEX IDX_SRC_EVALUATETASK_PROJECTID ON T_SRC_EVALUATETASK ( FPROJECTID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATETASK_SUPID') CREATE INDEX IDX_SRC_EVALUATETASK_SUPID ON T_SRC_EVALUATETASK ( FSUPPLIERID );


 EXEC P_ALTERPK 'PK_SRC_EVALUATEENTRY', 'T_SRC_EVALUATEENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVALUATEENTRY_INDEXID') CREATE INDEX IDX_SRC_EVALUATEENTRY_INDEXID ON T_SRC_EVALUATEENTRY ( FINDEXID );


 EXEC P_ALTERPK 'PK_SRC_EVALUATEDETAIL', 'T_SRC_EVALUATEDETAIL', 'FDETAILID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVADETAIL_PID') CREATE INDEX IDX_SRC_EVADETAIL_PID ON T_SRC_EVALUATEDETAIL ( FPROJECTID );

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_EVAETAIL_SCORERID') CREATE INDEX IDX_SRC_EVAETAIL_SCORERID ON T_SRC_EVALUATEDETAIL ( FSCORERID );


 EXEC P_ALTERPK 'PK_SRC_DEMANDSUPPLIER', 'T_SRC_DEMANDSUPPLIER', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_DEMANDSUPPLIER_FPAG') CREATE INDEX IDX_SRC_DEMANDSUPPLIER_FPAG ON T_SRC_DEMANDSUPPLIER ( FPACKAGEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_DEMANDSUPPLIER_FSUP') CREATE INDEX IDX_SRC_DEMANDSUPPLIER_FSUP ON T_SRC_DEMANDSUPPLIER ( FSUPPLIERID );

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



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