/**Begin C:\PDM_UPGRADE\PDM1\SRM_constraint.sql **/
 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPL', 'T_SRM_AUTOEVATPL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_EVATPLSUPPLIERENTRY', 'T_SRM_EVATPLSUPPLIERENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_EVATPLSCORERENTRY', 'T_SRM_EVATPLSCORERENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPL_L', 'T_SRM_AUTOEVATPL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPLVER', 'T_SRM_AUTOEVATPLVER', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_EVATPLSUPPLIERVER', 'T_SRM_EVATPLSUPPLIERVER', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_EVATPLSCOREVER', 'T_SRM_EVATPLSCOREVER', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPLVER_L', 'T_SRM_AUTOEVATPLVER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPLLOG', 'T_SRM_AUTOEVATPLLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_AUTOEVATPLLOG_FTAG') CREATE INDEX IDX_SRM_AUTOEVATPLLOG_FTAG ON T_SRM_AUTOEVATPLLOG ( FTAG );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SRM_AUTOEVATPLLOG_FSTATUS') CREATE INDEX IDX_SRM_AUTOEVATPLLOG_FSTATUS ON T_SRM_AUTOEVATPLLOG ( FEXECSTATUS );


 EXEC P_ALTERPK 'PK_SRM_AUTOEVATPLLOG_L', 'T_SRM_AUTOEVATPLLOG_L', 'FPKID', '1';

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



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