Skip to content

Create new release? #48

@navinpai

Description

@navinpai

Tried to use the latest release of this project to migrate Grafana 9.x from sqlite to postgres. Got the following error:

time="2023-09-05T14:07:51Z" level=info msg="📁 SQLlite file: /var/lib/grafana/grafana.db"
time="2023-09-05T14:07:51Z" level=info msg="📁 Dump directory: /tmp"
time="2023-09-05T14:07:51Z" level=info msg="✅ sqlite3 command exists"
time="2023-09-05T14:07:52Z" level=info msg="✅ sqlite3 database dumped to /tmp/grafana.sql"
time="2023-09-05T14:07:53Z" level=info msg="✅ CREATE statements removed from dump file"
time="2023-09-05T14:07:57Z" level=info msg="✅ sqlite3 dump sanitized"
time="2023-09-05T14:07:58Z" level=info msg="✅ migration_log statements removed"
time="2023-09-05T14:07:58Z" level=info msg="✅ char keyword transformed"
time="2023-09-05T14:07:58Z" level=info msg="✅ hex-encoded data values wrapped for insertion"
time="2023-09-05T14:08:08Z" level=fatal msg="❌ pq: column \"is_paused\" is of type boolean but expression is of type integer INSERT INTO \"alert_rule\" VALUES(1,1,'Alert-testing','C','[{\"refId\":\"A\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":900,\"to\":0},\"datasourceUid\":\"metrics\",\"model\":{\"editorMode\":\"builder\",\"expr\":\"container_cpu_usage_seconds_total\",\"hide\":false,\"intervalMs\":1000,\"legendFormat\":\"__auto\",\"maxDataPoints\":43200,\"range\":true,\"refId\":\"A\"}},{\"refId\":\"B\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":900,\"to\":0},\"datasourceUid\":\"__expr__\",\"model\":{\"conditions\":[{\"evaluator\":{\"params\":[],\"type\":\"gt\"},\"operator\":{\"type\":\"and\"},\"query\":{\"params\":[\"B\"]},\"reducer\":{\"params\":[],\"type\":\"last\"},\"type\":\"query\"}],\"datasource\":{\"type\":\"__expr__\",\"uid\":\"__expr__\"},\"expression\":\"A\",\"hide\":false,\"intervalMs\":1000,\"maxDataPoints\":43200,\"reducer\":\"last\",\"refId\":\"B\",\"type\":\"reduce\"}},{\"refId\":\"C\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":900,\"to\":0},\"datasourceUid\":\"__expr__\",\"model\":{\"conditions\":[{\"evaluator\":{\"params\":[1],\"type\":\"gt\"},\"operator\":{\"type\":\"and\"},\"query\":{\"params\":[\"C\"]},\"reducer\":{\"params\":[],\"type\":\"last\"},\"type\":\"query\"}],\"datasource\":{\"type\":\"__expr__\",\"uid\":\"__expr__\"},\"expression\":\"B\",\"hide\":false,\"intervalMs\":1000,\"maxDataPoints\":43200,\"refId\":\"C\",\"type\":\"threshold\"}}]','2023-09-05 11:18:29',60,2,'2QvWDLkSk','K3O-lFkIz','devops','NoData','Error',300000000000,'{}','{}',NULL,NULL,1,0) - failed to import dump file to Postgres."

Looks like this is caused because of the field is_paused in the table alert_rule not satisfying the SQLite constraint of boolean<>integer.

But I noticed that these columns were handled as part of this commit. However, looks like there's been no release created with this change.

Could you please create a new release (It's anyway been 10 months since the last release)? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions