-
What Grafana version and what operating system are you using?
version 12.4.1, with official docker image deployed in K8s -
What are you trying to achieve?
upgrade from 12.4.1 to 13.1.1 -
How are you trying to achieve it?
Update the image tag in deployment configuration in K8s. -
What happened?
DB error shown as below:
Error: ✗ migration failed (id = Increase precision of team.updated to DATETIME(3)): pq: duplicate key value violates unique constraint “migration_log_pkey” (23505)I have checked our postgresql db of the migration_log table, but can’t find this item.
id = Increase precision of team.updated to DATETIME(3) -
What did you expect to happen?
-
Can you copy/paste the configuration(s) that you are having problems with?
-
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
-
Did you follow any online instructions? If so, what is the URL?
Some of what I did didn’t go all the way through for whatever reason. N yes, it needs to be updated to the new version. 13.1.1. I know where to do it in the page you referenced. As I’m waiting on people to stop adding so many filings trying to fix it as I have to Add a few API’s not very many minutes ago.. I’ve been trying to give everyone their milestones and this stuff isn’t working properly so reset everything that can be rest. Matter of fact it needs to be updated after works. [If you put it in rest mode it will update automatically update when turning on. So plug your phone in or device..]
Thanks, @kimberlyyerhot63 .
I will try very new version till this issue fixed.
One possibility is that the sequence backing migration_log.id is out of sync with the table, since that can result in duplicate primary key errors. However, the error alone doesn’t confirm that’s the cause.
Could you also share →
the full Grafana startup log from Starting DB migrations through the duplicate key value violates unique constraint "migration_log_pkey" error, and
whether only one Grafana instance/pod was running while the upgrade was performing the database migration?
That should help determine whether this is a sequence issue, concurrent migration attempts, or another migration problem.
Thanks, @infofcc3 .
You give me an idea to rollback grafana db to an older version and seems works.
Please close the ticket.

