a tool for shared writing and social publishing
1create table "public"."atp_poll_votes" (
2 "uri" text not null,
3 "record" jsonb not null,
4 "voter_did" text not null,
5 "poll_uri" text not null,
6 "poll_cid" text not null,
7 "option" text not null,
8 "indexed_at" timestamp with time zone not null default now()
9);
10
11alter table "public"."atp_poll_votes" enable row level security;
12
13CREATE UNIQUE INDEX atp_poll_votes_pkey ON public.atp_poll_votes USING btree (uri);
14
15alter table "public"."atp_poll_votes" add constraint "atp_poll_votes_pkey" PRIMARY KEY using index "atp_poll_votes_pkey";
16
17CREATE INDEX atp_poll_votes_poll_uri_idx ON public.atp_poll_votes USING btree (poll_uri);
18
19CREATE INDEX atp_poll_votes_voter_did_idx ON public.atp_poll_votes USING btree (voter_did);
20
21grant delete on table "public"."atp_poll_votes" to "anon";
22
23grant insert on table "public"."atp_poll_votes" to "anon";
24
25grant references on table "public"."atp_poll_votes" to "anon";
26
27grant select on table "public"."atp_poll_votes" to "anon";
28
29grant trigger on table "public"."atp_poll_votes" to "anon";
30
31grant truncate on table "public"."atp_poll_votes" to "anon";
32
33grant update on table "public"."atp_poll_votes" to "anon";
34
35grant delete on table "public"."atp_poll_votes" to "authenticated";
36
37grant insert on table "public"."atp_poll_votes" to "authenticated";
38
39grant references on table "public"."atp_poll_votes" to "authenticated";
40
41grant select on table "public"."atp_poll_votes" to "authenticated";
42
43grant trigger on table "public"."atp_poll_votes" to "authenticated";
44
45grant truncate on table "public"."atp_poll_votes" to "authenticated";
46
47grant update on table "public"."atp_poll_votes" to "authenticated";
48
49grant delete on table "public"."atp_poll_votes" to "service_role";
50
51grant insert on table "public"."atp_poll_votes" to "service_role";
52
53grant references on table "public"."atp_poll_votes" to "service_role";
54
55grant select on table "public"."atp_poll_votes" to "service_role";
56
57grant trigger on table "public"."atp_poll_votes" to "service_role";
58
59grant truncate on table "public"."atp_poll_votes" to "service_role";
60
61grant update on table "public"."atp_poll_votes" to "service_role";
62
63create table "public"."atp_poll_records" (
64 "uri" text not null,
65 "cid" text not null,
66 "record" jsonb not null,
67 "created_at" timestamp with time zone not null default now()
68);
69
70
71alter table "public"."atp_poll_records" enable row level security;
72
73alter table "public"."bsky_follows" alter column "identity" set default ''::text;
74
75CREATE UNIQUE INDEX atp_poll_records_pkey ON public.atp_poll_records USING btree (uri);
76
77alter table "public"."atp_poll_records" add constraint "atp_poll_records_pkey" PRIMARY KEY using index "atp_poll_records_pkey";
78
79alter table "public"."atp_poll_votes" add constraint "atp_poll_votes_poll_uri_fkey" FOREIGN KEY (poll_uri) REFERENCES atp_poll_records(uri) ON UPDATE CASCADE ON DELETE CASCADE not valid;
80
81alter table "public"."atp_poll_votes" validate constraint "atp_poll_votes_poll_uri_fkey";
82
83grant delete on table "public"."atp_poll_records" to "anon";
84
85grant insert on table "public"."atp_poll_records" to "anon";
86
87grant references on table "public"."atp_poll_records" to "anon";
88
89grant select on table "public"."atp_poll_records" to "anon";
90
91grant trigger on table "public"."atp_poll_records" to "anon";
92
93grant truncate on table "public"."atp_poll_records" to "anon";
94
95grant update on table "public"."atp_poll_records" to "anon";
96
97grant delete on table "public"."atp_poll_records" to "authenticated";
98
99grant insert on table "public"."atp_poll_records" to "authenticated";
100
101grant references on table "public"."atp_poll_records" to "authenticated";
102
103grant select on table "public"."atp_poll_records" to "authenticated";
104
105grant trigger on table "public"."atp_poll_records" to "authenticated";
106
107grant truncate on table "public"."atp_poll_records" to "authenticated";
108
109grant update on table "public"."atp_poll_records" to "authenticated";
110
111grant delete on table "public"."atp_poll_records" to "service_role";
112
113grant insert on table "public"."atp_poll_records" to "service_role";
114
115grant references on table "public"."atp_poll_records" to "service_role";
116
117grant select on table "public"."atp_poll_records" to "service_role";
118
119grant trigger on table "public"."atp_poll_records" to "service_role";
120
121grant truncate on table "public"."atp_poll_records" to "service_role";
122
123grant update on table "public"."atp_poll_records" to "service_role";