a tool for shared writing and social publishing
1create table "public"."leaflets_in_publications" (
2 "publication" text not null,
3 "doc" text default ''::text,
4 "leaflet" uuid not null
5);
6alter table "public"."leaflets_in_publications" enable row level security;
7CREATE UNIQUE INDEX leaflets_in_publications_pkey ON public.leaflets_in_publications USING btree (publication, leaflet);
8alter table "public"."leaflets_in_publications" add constraint "leaflets_in_publications_pkey" PRIMARY KEY using index "leaflets_in_publications_pkey";
9alter table "public"."leaflets_in_publications" add constraint "leaflets_in_publications_doc_fkey" FOREIGN KEY (doc) REFERENCES documents(uri) not valid;
10alter table "public"."leaflets_in_publications" validate constraint "leaflets_in_publications_doc_fkey";
11alter table "public"."leaflets_in_publications" add constraint "leaflets_in_publications_leaflet_fkey" FOREIGN KEY (leaflet) REFERENCES permission_tokens(id) not valid;
12alter table "public"."leaflets_in_publications" validate constraint "leaflets_in_publications_leaflet_fkey";
13alter table "public"."leaflets_in_publications" add constraint "leaflets_in_publications_publication_fkey" FOREIGN KEY (publication) REFERENCES publications(uri) not valid;
14alter table "public"."leaflets_in_publications" validate constraint "leaflets_in_publications_publication_fkey";
15grant delete on table "public"."leaflets_in_publications" to "anon";
16grant insert on table "public"."leaflets_in_publications" to "anon";
17grant references on table "public"."leaflets_in_publications" to "anon";
18grant select on table "public"."leaflets_in_publications" to "anon";
19grant trigger on table "public"."leaflets_in_publications" to "anon";
20grant truncate on table "public"."leaflets_in_publications" to "anon";
21grant update on table "public"."leaflets_in_publications" to "anon";
22grant delete on table "public"."leaflets_in_publications" to "authenticated";
23grant insert on table "public"."leaflets_in_publications" to "authenticated";
24grant references on table "public"."leaflets_in_publications" to "authenticated";
25grant select on table "public"."leaflets_in_publications" to "authenticated";
26grant trigger on table "public"."leaflets_in_publications" to "authenticated";
27grant truncate on table "public"."leaflets_in_publications" to "authenticated";
28grant update on table "public"."leaflets_in_publications" to "authenticated";
29grant delete on table "public"."leaflets_in_publications" to "service_role";
30grant insert on table "public"."leaflets_in_publications" to "service_role";
31grant references on table "public"."leaflets_in_publications" to "service_role";
32grant select on table "public"."leaflets_in_publications" to "service_role";
33grant trigger on table "public"."leaflets_in_publications" to "service_role";
34grant truncate on table "public"."leaflets_in_publications" to "service_role";
35grant update on table "public"."leaflets_in_publications" to "service_role";