add unique multicolumn index to prevent duplicate alerts (#662)

This commit is contained in:
henrygd
2025-03-13 02:20:27 -04:00
parent d36b8369cc
commit 6b766b2653

View File

@@ -131,7 +131,7 @@ func init() {
}
],
"indexes": [
"CREATE INDEX ` + "`" + `idx_MnhEt21L5r` + "`" + ` ON ` + "`" + `alerts` + "`" + ` (` + "`" + `system` + "`" + `)"
"CREATE UNIQUE INDEX ` + "`" + `idx_MnhEt21L5r` + "`" + ` ON ` + "`" + `alerts` + "`" + ` (\n ` + "`" + `user` + "`" + `,\n ` + "`" + `system` + "`" + `,\n ` + "`" + `name` + "`" + `\n)"
],
"system": false
},