grafana/pkg/services/sqlstore/migrator
Sofia Papagiannaki 04d5dcb7c8
Alerting: modify DB table, accessors and migration to restrict org access (#37414)
* Alerting: modify table and accessors to limit org access appropriately

* Update migration to create multiple Alertmanager configs

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>

* replace mg.ClearMigrationEntry()

mg.ClearMigrationEntry() would create a new session.
This commit introduces a new migration for clearing an entry from migration log for replacing  mg.ClearMigrationEntry() so that all dashboard alert migration operations will run inside the same transaction.
It adds also `SkipMigrationLog()` in Migrator interface for skipping adding an entry in the migration_log.

Co-authored-by: gotjosh <josue@grafana.com>
2021-08-12 16:04:09 +03:00
..
column.go move database-specific code into dialects (#11884) 2018-05-10 16:54:21 +02:00
conditions.go Chore: Fix SQL related Go variable naming (#28887) 2020-11-11 06:21:08 +01:00
dialect.go AlertingNG: Save alert instances (#30223) 2021-01-18 20:57:17 +02:00
migrations.go Alerting: modify DB table, accessors and migration to restrict org access (#37414) 2021-08-12 16:04:09 +03:00
migrator.go Alerting: modify DB table, accessors and migration to restrict org access (#37414) 2021-08-12 16:04:09 +03:00
mysql_dialect.go Chore: Fix mysql integration tests (#33606) 2021-05-02 19:49:38 +02:00
postgres_dialect.go AlertingNG: Save alert instances (#30223) 2021-01-18 20:57:17 +02:00
sqlite_dialect.go AlertingNG: Save alert instances (#30223) 2021-01-18 20:57:17 +02:00
types.go Alerting: modify DB table, accessors and migration to restrict org access (#37414) 2021-08-12 16:04:09 +03:00