From 78bf2502cbf1e26980abf6c0ffb7f0c74b917a3b Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sat, 28 Mar 2026 06:20:36 +0000
Subject: fix(notifications): support per-device push subscriptions

---
 supabase/notifications.sql | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 supabase/notifications.sql

(limited to 'supabase/notifications.sql')

diff --git a/supabase/notifications.sql b/supabase/notifications.sql
new file mode 100644
index 00000000..81905a29
--- /dev/null
+++ b/supabase/notifications.sql
@@ -0,0 +1,9 @@
+ALTER TABLE public.user_notifications
+	DROP CONSTRAINT IF EXISTS user_notifications_user_id_key;
+
+ALTER TABLE public.user_notifications
+	DROP CONSTRAINT IF EXISTS user_notifications_user_id_fingerprint_key;
+
+ALTER TABLE public.user_notifications
+	ADD CONSTRAINT user_notifications_user_id_fingerprint_key
+		UNIQUE (user_id, fingerprint);
-- 
cgit v1.2.3

