From ab5a079bcc5b0f0a6929f0a3742eb2859d4a3498 Mon Sep 17 00:00:00 2001 From: Kristin Laemmert Date: Fri, 21 Jun 2024 08:35:46 -0400 Subject: [PATCH] Fix: add mapping for the new mysqlRepl driver (#89551) --- pkg/services/sqlstore/migrator/dialect.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkg/services/sqlstore/migrator/dialect.go b/pkg/services/sqlstore/migrator/dialect.go index 5aae742b6ca..a62d0bfe284 100644 --- a/pkg/services/sqlstore/migrator/dialect.go +++ b/pkg/services/sqlstore/migrator/dialect.go @@ -6,9 +6,10 @@ import ( "strconv" "strings" - "github.com/grafana/grafana/pkg/services/sqlstore/session" "golang.org/x/exp/slices" "xorm.io/xorm" + + "github.com/grafana/grafana/pkg/services/sqlstore/session" ) var ( @@ -106,12 +107,13 @@ type LockCfg struct { type dialectFunc func() Dialect var supportedDialects = map[string]dialectFunc{ - MySQL: NewMysqlDialect, - SQLite: NewSQLite3Dialect, - Postgres: NewPostgresDialect, - MySQL + "WithHooks": NewMysqlDialect, - SQLite + "WithHooks": NewSQLite3Dialect, - Postgres + "WithHooks": NewPostgresDialect, + MySQL: NewMysqlDialect, + SQLite: NewSQLite3Dialect, + Postgres: NewPostgresDialect, + MySQL + "WithHooks": NewMysqlDialect, + MySQL + "ReplicaWithHooks": NewMysqlDialect, + SQLite + "WithHooks": NewSQLite3Dialect, + Postgres + "WithHooks": NewPostgresDialect, } func NewDialect(driverName string) Dialect {