File tree Expand file tree Collapse file tree 7 files changed +33
-29
lines changed
Expand file tree Collapse file tree 7 files changed +33
-29
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,17 @@ DROP POLICY IF EXISTS "public read" ON bookmarked_searches;
2424CREATE POLICY " public read" ON bookmarked_searches
2525 FOR SELECT USING (true);
2626
27- DROP POLICY IF EXISTS " self delete" ON bookmarked_searches;
28- CREATE POLICY " self delete" ON bookmarked_searches
29- FOR DELETE USING (creator_id = firebase_uid());
30-
31- DROP POLICY IF EXISTS " self insert" ON bookmarked_searches;
32- CREATE POLICY " self insert" ON bookmarked_searches
33- FOR INSERT WITH CHECK (creator_id = firebase_uid());
34-
35- DROP POLICY IF EXISTS " self update" ON bookmarked_searches;
36- CREATE POLICY " self update" ON bookmarked_searches
37- FOR UPDATE USING (creator_id = firebase_uid());
27+ -- DROP POLICY IF EXISTS "self delete" ON bookmarked_searches;
28+ -- CREATE POLICY "self delete" ON bookmarked_searches
29+ -- FOR DELETE USING (creator_id = firebase_uid());
30+ --
31+ -- DROP POLICY IF EXISTS "self insert" ON bookmarked_searches;
32+ -- CREATE POLICY "self insert" ON bookmarked_searches
33+ -- FOR INSERT WITH CHECK (creator_id = firebase_uid());
34+ --
35+ -- DROP POLICY IF EXISTS "self update" ON bookmarked_searches;
36+ -- CREATE POLICY "self update" ON bookmarked_searches
37+ -- FOR UPDATE USING (creator_id = firebase_uid());
3838
3939-- Indexes
4040CREATE INDEX IF NOT EXISTS bookmarked_searches_creator_id_created_time_idx
Original file line number Diff line number Diff line change @@ -29,17 +29,17 @@ DROP POLICY IF EXISTS "public read" ON compatibility_answers;
2929CREATE POLICY " public read" ON compatibility_answers
3030 FOR SELECT USING (true);
3131
32- DROP POLICY IF EXISTS " self delete" ON compatibility_answers;
33- CREATE POLICY " self delete" ON compatibility_answers
34- FOR DELETE USING (creator_id = firebase_uid());
35-
36- DROP POLICY IF EXISTS " self insert" ON compatibility_answers;
37- CREATE POLICY " self insert" ON compatibility_answers
38- FOR INSERT WITH CHECK (creator_id = firebase_uid());
39-
40- DROP POLICY IF EXISTS " self update" ON compatibility_answers;
41- CREATE POLICY " self update" ON compatibility_answers
42- FOR UPDATE USING (creator_id = firebase_uid());
32+ -- DROP POLICY IF EXISTS "self delete" ON compatibility_answers;
33+ -- CREATE POLICY "self delete" ON compatibility_answers
34+ -- FOR DELETE USING (creator_id = firebase_uid());
35+ --
36+ -- DROP POLICY IF EXISTS "self insert" ON compatibility_answers;
37+ -- CREATE POLICY "self insert" ON compatibility_answers
38+ -- FOR INSERT WITH CHECK (creator_id = firebase_uid());
39+ --
40+ -- DROP POLICY IF EXISTS "self update" ON compatibility_answers;
41+ -- CREATE POLICY "self update" ON compatibility_answers
42+ -- FOR UPDATE USING (creator_id = firebase_uid());
4343
4444-- Indexes
4545CREATE INDEX IF NOT EXISTS compatibility_answers_creator_id_created_time_idx
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ALTER TABLE compatibility_prompts ENABLE ROW LEVEL SECURITY;
2121-- Policies
2222DROP POLICY IF EXISTS " public read" ON compatibility_prompts;
2323CREATE POLICY " public read" ON compatibility_prompts
24- FOR ALL USING (true);
24+ FOR SELECT USING (true);
2525
2626-- Indexes
2727-- The primary key automatically creates a unique index on (id),
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ CREATE TABLE IF NOT EXISTS private_user_message_channels (
99-- Row Level Security
1010ALTER TABLE private_user_message_channels ENABLE ROW LEVEL SECURITY;
1111
12+
13+
1214-- Policies
1315DROP POLICY IF EXISTS " public read" ON private_user_message_channels;
14-
1516CREATE POLICY " public read" ON private_user_message_channels
16- FOR ALL
17- USING (true);
17+ FOR SELECT USING (true);
1818
1919-- Indexes
2020-- Removed redundant primary key index creation because PRIMARY KEY already creates a unique index on id
Original file line number Diff line number Diff line change @@ -26,9 +26,13 @@ ALTER TABLE profile_comments
2626-- Row Level Security
2727ALTER TABLE profile_comments ENABLE ROW LEVEL SECURITY;
2828
29+ DROP POLICY IF EXISTS " public read" ON profile_comments;
30+ CREATE POLICY " public read" ON profile_comments
31+ FOR SELECT USING (true);
32+
2933-- Policies
3034DROP POLICY IF EXISTS " public read" ON profile_comments;
31- CREATE POLICY " public read" ON profile_comments FOR ALL USING (true);
35+ CREATE POLICY " public read" ON profile_comments FOR SELECT USING (true);
3236
3337-- Indexes
3438CREATE INDEX IF NOT EXISTS profile_comments_user_id_idx
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ ALTER TABLE vote_results ENABLE ROW LEVEL SECURITY;
2121-- Policies
2222DROP POLICY IF EXISTS " public read" ON vote_results;
2323CREATE POLICY " public read" ON vote_results
24- FOR ALL USING (true);
24+ FOR SELECT USING (true);
2525
2626-- Indexes
2727CREATE INDEX IF NOT EXISTS user_id_idx ON vote_results (user_id);
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ ALTER TABLE votes ENABLE ROW LEVEL SECURITY;
1717-- Policies
1818DROP POLICY IF EXISTS " public read" ON votes;
1919CREATE POLICY " public read" ON votes
20- FOR ALL USING (true);
20+ FOR SELECT USING (true);
2121
2222-- Indexes
2323CREATE INDEX IF NOT EXISTS creator_id_idx ON votes (creator_id);
You can’t perform that action at this time.
0 commit comments