summaryrefslogtreecommitdiff
path: root/supabase/schema.sql
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-09 21:12:16 -0800
committerFuwn <[email protected]>2026-02-09 21:12:16 -0800
commit3c0b53ccbe40a75d6105f0e22c43a9f46975d9c1 (patch)
tree7289ba4e663ed388f0effc9462d845c9120cc785 /supabase/schema.sql
parentfix: elevate to AAL2 before password/email change when MFA is enabled (diff)
downloadasa.news-3c0b53ccbe40a75d6105f0e22c43a9f46975d9c1.tar.xz
asa.news-3c0b53ccbe40a75d6105f0e22c43a9f46975d9c1.zip
feat: add per-feed "hide from timeline" option
Diffstat (limited to 'supabase/schema.sql')
-rw-r--r--supabase/schema.sql3
1 files changed, 3 insertions, 0 deletions
diff --git a/supabase/schema.sql b/supabase/schema.sql
index 147dd8a..6603c36 100644
--- a/supabase/schema.sql
+++ b/supabase/schema.sql
@@ -85,6 +85,7 @@ CREATE TABLE public.subscriptions (
custom_title text,
position integer NOT NULL DEFAULT 0,
vault_secret_id uuid,
+ hidden_from_timeline boolean NOT NULL DEFAULT false,
created_at timestamp with time zone NOT NULL DEFAULT now(),
updated_at timestamp with time zone NOT NULL DEFAULT now()
);
@@ -581,6 +582,7 @@ AS $function$
(e.owner_id IS NULL OR e.owner_id = auth.uid())
AND (target_folder_id IS NULL OR s.folder_id = target_folder_id)
AND (target_feed_id IS NULL OR e.feed_id = target_feed_id)
+ AND (target_feed_id IS NOT NULL OR s.hidden_from_timeline = false)
AND (pagination_cursor IS NULL OR e.published_at < pagination_cursor)
AND (NOT unread_only OR COALESCE(ues.read, false) = false)
AND NOT EXISTS (
@@ -797,6 +799,7 @@ AS $function$
OR e.summary ILIKE '%' || replace(replace(replace(p_query, '\', '\\'), '%', '\%'), '_', '\_') || '%' ESCAPE '\'
OR e.author ILIKE '%' || replace(replace(replace(p_query, '\', '\\'), '%', '\%'), '_', '\_') || '%' ESCAPE '\'
)
+ AND s.hidden_from_timeline = false
AND (
(SELECT tier FROM public.user_profiles WHERE id = auth.uid()) IN ('pro', 'developer')
OR e.published_at >= now() - interval '14 days'