mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user