Skip to content

Commit bbefcc3

Browse files
committed
Add indexes to push_subscriptions
1 parent 09767db commit bbefcc3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

backend/supabase/push_subscriptions.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@ create table push_subscriptions (
88

99
-- Row Level Security
1010
ALTER TABLE push_subscriptions ENABLE ROW LEVEL SECURITY;
11+
12+
-- Indexes
13+
DROP INDEX IF EXISTS user_id_idx;
14+
CREATE INDEX user_id_idx ON push_subscriptions (user_id);
15+
16+
DROP INDEX IF EXISTS endpoint_idx;
17+
CREATE INDEX endpoint_idx ON push_subscriptions (endpoint);
18+
19+
DROP INDEX IF EXISTS endpoint_user_id_idx;
20+
CREATE INDEX endpoint_user_id_idx ON push_subscriptions (endpoint, user_id);

0 commit comments

Comments
 (0)