Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
36 lines
1.7 KiB
PL/PgSQL
36 lines
1.7 KiB
PL/PgSQL
-- Kino — suppression du système de notifications (22 novembre 2026). Idempotent.
|
|
-- Plus aucune notification n'est créée ni envoyée (cloche et push). Les tables restent en place,
|
|
-- vides, car d'autres fonctions y font encore référence (listes partagées…).
|
|
|
|
-- Envoi push à chaque notification, et notifications automatiques (abonnements, réactions)
|
|
drop trigger if exists notifications_push on public.notifications;
|
|
drop trigger if exists follows_notify on public.follows;
|
|
drop trigger if exists reactions_notify on public.review_reactions;
|
|
|
|
-- Commentaires, invitations… appelaient azuu_notify : elle ne fait plus rien
|
|
create or replace function public.azuu_notify(p_user uuid, p_kind text, p_actor uuid, p_item text default null, p_emoji text default null)
|
|
returns void language plpgsql security definer set search_path = '' as $$
|
|
begin
|
|
return;
|
|
end $$;
|
|
|
|
-- Nouveaux épisodes : plus de notification
|
|
create or replace function public.add_episode_notifications(p_list jsonb)
|
|
returns integer language plpgsql security definer set search_path = '' as $$
|
|
begin
|
|
return 0;
|
|
end $$;
|
|
|
|
-- Plus aucun appareil ne peut s'inscrire aux notifications push
|
|
revoke execute on function public.register_push_subscription(text, text, text, text, text) from public, anon, authenticated;
|
|
|
|
-- Données devenues inutiles : appareils inscrits et notifications déjà reçues
|
|
delete from public.push_subscriptions;
|
|
delete from public.notifications;
|
|
|
|
-- Ménage : fonctions et secrets qui ne servaient qu'à l'envoi push
|
|
drop function if exists public.azuu_push_dispatch();
|
|
drop function if exists public.push_claim(uuid);
|
|
drop function if exists public.push_done(uuid, text[], text[]);
|
|
delete from vault.secrets where name in ('azuu_push_secret', 'azuu_push_url');
|