From 6b766b2653114836009ba174768333535c68f442 Mon Sep 17 00:00:00 2001 From: henrygd Date: Thu, 13 Mar 2025 02:20:27 -0400 Subject: [PATCH] add unique multicolumn index to prevent duplicate alerts (#662) --- ...2_collections_snapshot.go => collections_snapshot_0_10_3.go} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename beszel/migrations/{1741144592_collections_snapshot.go => collections_snapshot_0_10_3.go} (98%) diff --git a/beszel/migrations/1741144592_collections_snapshot.go b/beszel/migrations/collections_snapshot_0_10_3.go similarity index 98% rename from beszel/migrations/1741144592_collections_snapshot.go rename to beszel/migrations/collections_snapshot_0_10_3.go index eccfd0f..a985f12 100644 --- a/beszel/migrations/1741144592_collections_snapshot.go +++ b/beszel/migrations/collections_snapshot_0_10_3.go @@ -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 },