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

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


 EXEC P_ALTERPK 'PK_SRC_DEMANDQTYCHGENTRY', 'T_SRC_DEMANDQTYCHGENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_MATERIALEND', 'T_SRC_MATERIALEND', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_MATERIALENDENTRY', 'T_SRC_MATERIALENDENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_RULEENTRY', 'T_SRC_RULEENTRY', 'FENTRYID', '1';

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

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


 EXEC P_ALTERPK 'PK_SRC_APTITUDERESULT', 'T_SRC_APTITUDERESULT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_APTITUDECONFIG', 'T_SRC_APTITUDECONFIG', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_APTITUDEUSER', 'T_SRC_APTITUDEUSER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_APTITUDESUPPLIER', 'T_SRC_APTITUDESUPPLIER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SCHEMESOURCETYPE', 'T_SRC_SCHEMESOURCETYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SCHEMESOURCEFLOW', 'T_SRC_SCHEMESOURCEFLOW', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPPLIERANALY', 'T_SRC_SUPPLIERANALY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRC_SUPPLIERANALY_SID') CREATE INDEX IDX_SRC_SUPPLIERANALY_SID ON T_SRC_SUPPLIERANALY ( FSCHEMEID );

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

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


 EXEC P_ALTERPK 'PK_SRC_SUPANALYHEAD', 'T_SRC_SUPANALYHEAD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPANALYSUPPLIER', 'T_SRC_SUPANALYSUPPLIER', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_SUPANALYDETAIL', 'T_SRC_SUPANALYDETAIL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRC_APTITUDECONFIG_FJ', 'T_SRC_APTITUDECONFIG_FJ', 'FPKID', '1';

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



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