···11-GRANT USAGE ON SCHEMA notifications TO anon, authenticated, service_role;
22-GRANT ALL ON ALL TABLES IN SCHEMA notifications TO anon, authenticated, service_role;
33-GRANT ALL ON ALL ROUTINES IN SCHEMA notifications TO anon, authenticated, service_role;
44-GRANT ALL ON ALL SEQUENCES IN SCHEMA notifications TO anon, authenticated, service_role;
55-ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA notifications GRANT ALL ON TABLES TO anon, authenticated, service_role;
66-ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA notifications GRANT ALL ON ROUTINES TO anon, authenticated, service_role;
77-ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA notifications GRANT ALL ON SEQUENCES TO anon, authenticated, service_role;
···11-create table "public"."notif_comments" (
22- "comment" text not null,
33- "created_at" timestamp with time zone not null default now(),
44- "identity" uuid not null,
55- "reason" text not null,
66- "read" boolean not null default false
77-);
88-99-1010-alter table "public"."notif_comments" enable row level security;
1111-1212-CREATE UNIQUE INDEX notif_comments_pkey ON public.notif_comments USING btree (comment, identity);
1313-1414-alter table "public"."notif_comments" add constraint "notif_comments_pkey" PRIMARY KEY using index "notif_comments_pkey";
1515-1616-alter table "public"."notif_comments" add constraint "notif_comments_comment_fkey" FOREIGN KEY (comment) REFERENCES comments_on_documents(uri) ON UPDATE CASCADE ON DELETE CASCADE not valid;
1717-1818-alter table "public"."notif_comments" validate constraint "notif_comments_comment_fkey";
1919-2020-alter table "public"."notif_comments" add constraint "notif_comments_identity_fkey" FOREIGN KEY (identity) REFERENCES identities(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
2121-2222-alter table "public"."notif_comments" validate constraint "notif_comments_identity_fkey";
2323-2424-grant delete on table "public"."notif_comments" to "anon";
2525-2626-grant insert on table "public"."notif_comments" to "anon";
2727-2828-grant references on table "public"."notif_comments" to "anon";
2929-3030-grant select on table "public"."notif_comments" to "anon";
3131-3232-grant trigger on table "public"."notif_comments" to "anon";
3333-3434-grant truncate on table "public"."notif_comments" to "anon";
3535-3636-grant update on table "public"."notif_comments" to "anon";
3737-3838-grant delete on table "public"."notif_comments" to "authenticated";
3939-4040-grant insert on table "public"."notif_comments" to "authenticated";
4141-4242-grant references on table "public"."notif_comments" to "authenticated";
4343-4444-grant select on table "public"."notif_comments" to "authenticated";
4545-4646-grant trigger on table "public"."notif_comments" to "authenticated";
4747-4848-grant truncate on table "public"."notif_comments" to "authenticated";
4949-5050-grant update on table "public"."notif_comments" to "authenticated";
5151-5252-grant delete on table "public"."notif_comments" to "service_role";
5353-5454-grant insert on table "public"."notif_comments" to "service_role";
5555-5656-grant references on table "public"."notif_comments" to "service_role";
5757-5858-grant select on table "public"."notif_comments" to "service_role";
5959-6060-grant trigger on table "public"."notif_comments" to "service_role";
6161-6262-grant truncate on table "public"."notif_comments" to "service_role";
6363-6464-grant update on table "public"."notif_comments" to "service_role";
6565-6666-drop table "notifications"."comment_notifications";
6767-drop schema if exists "notifications";
···11-alter table "public"."notif_comments" drop constraint "notif_comments_identity_fkey";
22-33-alter table "public"."notif_comments" alter column "identity" set data type text using "identity"::text;
44-55-alter table "public"."notif_comments" add constraint "notif_comments_identity_fkey" FOREIGN KEY (identity) REFERENCES identities(atp_did) ON UPDATE CASCADE ON DELETE CASCADE not valid;
66-77-alter table "public"."notif_comments" validate constraint "notif_comments_identity_fkey";
···11+create table "public"."notifications" (
22+ "recipient" text not null,
33+ "created_at" timestamp with time zone not null default now(),
44+ "read" boolean not null default false,
55+ "data" jsonb not null
66+);
77+88+99+alter table "public"."notifications" enable row level security;
1010+1111+CREATE UNIQUE INDEX notifications_pkey ON public.notifications USING btree (recipient);
1212+1313+alter table "public"."notifications" add constraint "notifications_pkey" PRIMARY KEY using index "notifications_pkey";
1414+1515+alter table "public"."notifications" add constraint "notifications_recipient_fkey" FOREIGN KEY (recipient) REFERENCES identities(atp_did) ON UPDATE CASCADE ON DELETE CASCADE not valid;
1616+1717+alter table "public"."notifications" validate constraint "notifications_recipient_fkey";
1818+1919+grant delete on table "public"."notifications" to "anon";
2020+2121+grant insert on table "public"."notifications" to "anon";
2222+2323+grant references on table "public"."notifications" to "anon";
2424+2525+grant select on table "public"."notifications" to "anon";
2626+2727+grant trigger on table "public"."notifications" to "anon";
2828+2929+grant truncate on table "public"."notifications" to "anon";
3030+3131+grant update on table "public"."notifications" to "anon";
3232+3333+grant delete on table "public"."notifications" to "authenticated";
3434+3535+grant insert on table "public"."notifications" to "authenticated";
3636+3737+grant references on table "public"."notifications" to "authenticated";
3838+3939+grant select on table "public"."notifications" to "authenticated";
4040+4141+grant trigger on table "public"."notifications" to "authenticated";
4242+4343+grant truncate on table "public"."notifications" to "authenticated";
4444+4545+grant update on table "public"."notifications" to "authenticated";
4646+4747+grant delete on table "public"."notifications" to "service_role";
4848+4949+grant insert on table "public"."notifications" to "service_role";
5050+5151+grant references on table "public"."notifications" to "service_role";
5252+5353+grant select on table "public"."notifications" to "service_role";
5454+5555+grant trigger on table "public"."notifications" to "service_role";
5656+5757+grant truncate on table "public"."notifications" to "service_role";
5858+5959+grant update on table "public"."notifications" to "service_role";