Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Database: Initialize xorm with an empty schema for postgres (grafana#…
…17357) xorm introduced some changes in go-xorm/xorm#824 and go-xorm/xorm#876 which by default will use public as the postgres schema and this was a breaking change compared to before. Grafana has implemented a custom postgres dialect so above changes wasn't a problem here. However, Grafana's custom database migration was using xorm dialect to check if the migration table exists or not. For those using a custom search_path (schema) in postgres configured on server, database or user level the migration table check would not find the migration table since it was looking in public schema due to xorm changes above. This had the consequence that Grafana's database migration failed the second time since migration had already run migrations in another schema. This change will make xorm use an empty default schema for postgres and by that mimic the functionality of how it was functioning before xorm's changes above. Fixes grafana#16720 Co-Authored-By: Carl Bergquist <[email protected]>
- Loading branch information