a tool for shared writing and social publishing
1create table "public"."poll_votes_on_entity" (
2 "id" uuid not null default gen_random_uuid(),
3 "created_at" timestamp with time zone not null default now(),
4 "poll_entity" uuid not null,
5 "option_entity" uuid not null,
6 "voter_token" uuid not null
7);
8
9
10alter table "public"."poll_votes_on_entity" enable row level security;
11
12CREATE UNIQUE INDEX poll_votes_on_entity_pkey ON public.poll_votes_on_entity USING btree (id);
13
14alter table "public"."poll_votes_on_entity" add constraint "poll_votes_on_entity_pkey" PRIMARY KEY using index "poll_votes_on_entity_pkey";
15
16alter table "public"."poll_votes_on_entity" add constraint "poll_votes_on_entity_option_entity_fkey" FOREIGN KEY (option_entity) REFERENCES entities(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
17
18alter table "public"."poll_votes_on_entity" validate constraint "poll_votes_on_entity_option_entity_fkey";
19
20alter table "public"."poll_votes_on_entity" add constraint "poll_votes_on_entity_poll_entity_fkey" FOREIGN KEY (poll_entity) REFERENCES entities(id) ON UPDATE CASCADE ON DELETE CASCADE not valid;
21
22alter table "public"."poll_votes_on_entity" validate constraint "poll_votes_on_entity_poll_entity_fkey";
23
24grant delete on table "public"."poll_votes_on_entity" to "anon";
25
26grant insert on table "public"."poll_votes_on_entity" to "anon";
27
28grant references on table "public"."poll_votes_on_entity" to "anon";
29
30grant select on table "public"."poll_votes_on_entity" to "anon";
31
32grant trigger on table "public"."poll_votes_on_entity" to "anon";
33
34grant truncate on table "public"."poll_votes_on_entity" to "anon";
35
36grant update on table "public"."poll_votes_on_entity" to "anon";
37
38grant delete on table "public"."poll_votes_on_entity" to "authenticated";
39
40grant insert on table "public"."poll_votes_on_entity" to "authenticated";
41
42grant references on table "public"."poll_votes_on_entity" to "authenticated";
43
44grant select on table "public"."poll_votes_on_entity" to "authenticated";
45
46grant trigger on table "public"."poll_votes_on_entity" to "authenticated";
47
48grant truncate on table "public"."poll_votes_on_entity" to "authenticated";
49
50grant update on table "public"."poll_votes_on_entity" to "authenticated";
51
52grant delete on table "public"."poll_votes_on_entity" to "service_role";
53
54grant insert on table "public"."poll_votes_on_entity" to "service_role";
55
56grant references on table "public"."poll_votes_on_entity" to "service_role";
57
58grant select on table "public"."poll_votes_on_entity" to "service_role";
59
60grant trigger on table "public"."poll_votes_on_entity" to "service_role";
61
62grant truncate on table "public"."poll_votes_on_entity" to "service_role";
63
64grant update on table "public"."poll_votes_on_entity" to "service_role";