We are upgrading our Grafana environment from Grafana 9 to 10.
We also wanted to upgrade Postgresql to version 15 from 13.
I made a dump of the DB and removed version 13 and installed 15. Imported the data and restarted Grafana v9. This had no issue. Grafana started correctly and i could see the dashboards working fine.
But when i stooped Grafana and upgraded to the latest 10 version Grafana could not startup. We got the following error in the logging:
logger=migrator t=2023-12-21T14:27:39.916634545+01:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-12-21T14:27:39.935661899+01:00 level=info msg="Executing migration" id="Add unique index team_org_id_uid"
logger=migrator t=2023-12-21T14:27:39.938332776+01:00 level=error msg="Executing migration failed" id="Add unique index team_org_id_uid" error="pq: permission denied for schema public" duration=2.669565ms
logger=migrator t=2023-12-21T14:27:39.938391592+01:00 level=error msg="Exec failed" error="pq: permission denied for schema public" sql="CREATE UNIQUE INDEX \"UQE_team_org_id_uid\" ON \"team\" (\"org_id\",\"uid\");"
When we roll back to version 9 Grafana started working correctly again.
-
What Grafana version and what operating system are you using?
-
What are you trying to achieve?
-
How are you trying to achieve it?
-
What happened?
-
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?