Closed maksim77 closed 4 years ago
Actually, the error is understandable. In the database that was initiated by Grafana, the "user" table contains the "postgres" user. And its id is 1. Accordingly, when trying to insert we have this error
INSERT INTO "user" VALUES(1,0,'admin','admin@localhost','','abac827d5dac0a20087bcae0cdc1kea40f0fa1099b0164c1be0a1aa16004567ce3559ddea5f477de8f5c138ec254cddc1a904e304','6uEodkHqcZhY','QvddX2N7owGQ','',1,1,0,'','2019-01-16 11:28:49','2019-01-16 11:29:42',1,'2020-05-22 10:19:06',0)
That's odd.... Normally the postgres user gets created in a separate table just called user
(no quotes).
grafana=# select * from user;
user
----------
postgres
(1 row)
grafana=# select count(*) from "user";
count
-------
93
(1 row)
I will look into it more today.
Maybe the reason is the Grafana of the 7.0 version? The release was very recent.
I successfully managed to migrate the database using https://github.com/haron/grafana-migrator (many thanks for the link!).
By the way, when running this program, errors of violation of uniqueness also appeared many times, but according to README they must be ignored.
Thank you for the great program!
I'm trying to migrate Grafana (7.0) from sqlite to postgres (12). An error occurs when trying to load the "users" table: