Hi, so we’ve had a little bit of a problem during a Grafana upgrade that resulted in 7.X being installed instead of 6.7.4.
We had to downgrade and were getting ready to restore the PG database from a backup but everything seemed to work fine so we ended up not restoring the DB.
That is until we needed to add a new datasource via provisioning and things didn’t go very well.
Service init failed: Datasource provisioning error: pq: duplicate key value violates unique constraint \"UQE_data_source_org_id_uid\"
We tried deleting a few constraints
and dropping the following index:
Things started working again in 6.7.4
However after testing to re-upgrade Grafana, we noticed these were not getting re-created.
Any advice on what should be done to ensure our DB is in a stable state when we upgrade to 7.X?
Of course the original backup does not have the latest user data, since this has been running for 3 weeks and losing that much user data is not an option.
We’re thinking we might have to create another DB, let Grafana create its tables, and then re-import our data inside that database.