mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
Migration: Remove table aliasing in delete statement to make it work for mariadb (#95226)
Migration: remove table aliasing in delete statement to make it work in mariadb
This commit is contained in:
parent
5e924f3a27
commit
6f7528f896
@ -86,7 +86,7 @@ func (m *orphanedServiceAccountPermissions) exec(sess *xorm.Session, mg *migrato
|
||||
}
|
||||
|
||||
// delete all orphaned permissions
|
||||
rawDelete := "DELETE FROM permission AS p WHERE p.kind = 'serviceaccounts' AND p.identifier IN(?" + strings.Repeat(",?", len(orphaned)-1) + ")"
|
||||
rawDelete := "DELETE FROM permission WHERE kind = 'serviceaccounts' AND identifier IN(?" + strings.Repeat(",?", len(orphaned)-1) + ")"
|
||||
deleteArgs := make([]any, 0, len(orphaned)+1)
|
||||
deleteArgs = append(deleteArgs, rawDelete)
|
||||
for _, id := range orphaned {
|
||||
|
Loading…
Reference in New Issue
Block a user