Scheduled event errors after migrating to 2.5

After migrating to 2.5 we're getting exceptions in various scheduled events. com.mendix.core.CoreRuntimeException: aa: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "system$scheduledeventinformation_pkey" at hZ.b(SourceFile:165) at com.mendix.core.Core.create(SourceFile:502) Why are we getting duplicate key errors?
2 answers

Why this is happening I don't know, but if this is a one time database issue (caused by the conversion to 2.5?) this is how to solve such errors:

In the table involved (in your case system$scheduledeventinformation), note the highest value of the id column (the last row when using 'view data' in pgAdmin). Now check the corresponding sequence (in your case system$scheduledeventinformation_id_seq; in the object browser of pgAdmin these sequences are located directly above the 'Tables' item). Change the current value property of the sequence to the highest id value in your table. This should solve the duplicate key error.


Thanks Alexander, seems your workaround works for now. Is there a way to prevent this with future migrations?