77-- PostgreSQL database dump
88--
99
10+ \restrict Hl9XxATRAdecxBiFt8PPZgKxbcBTtxdglRrKHEan0Af69hORYkknDeYWBzNNCd6
11+
1012-- Dumped from database version 17.6
1113-- Dumped by pg_dump version 17.6
1214
@@ -68,6 +70,106 @@ CREATE TABLE public.collaborators (
6870
6971ALTER TABLE public .collaborators OWNER TO " wire-server" ;
7072
73+ --
74+ -- Name: conversation; Type: TABLE; Schema: public; Owner: wire-server
75+ --
76+
77+ CREATE TABLE public .conversation (
78+ id uuid NOT NULL ,
79+ access integer [],
80+ access_roles_v2 integer [],
81+ cells_state integer ,
82+ channel_add_permission integer ,
83+ cipher_suite integer ,
84+ creator uuid,
85+ epoch bigint ,
86+ epoch_timestamp timestamp with time zone ,
87+ group_conv_type integer ,
88+ group_id bytea ,
89+ message_timer bigint ,
90+ name text ,
91+ protocol integer ,
92+ public_group_state bytea ,
93+ receipt_mode integer ,
94+ team uuid,
95+ type integer NOT NULL ,
96+ parent_conv uuid
97+ );
98+
99+
100+ ALTER TABLE public .conversation OWNER TO " wire-server" ;
101+
102+ --
103+ -- Name: conversation_member; Type: TABLE; Schema: public; Owner: wire-server
104+ --
105+
106+ CREATE TABLE public .conversation_member (
107+ conv uuid NOT NULL ,
108+ " user" uuid NOT NULL ,
109+ conversation_role text ,
110+ hidden boolean ,
111+ hidden_ref text ,
112+ otr_archived boolean ,
113+ otr_archived_ref text ,
114+ otr_muted boolean ,
115+ otr_muted_ref text ,
116+ otr_muted_status integer ,
117+ provider uuid,
118+ service uuid
119+ );
120+
121+
122+ ALTER TABLE public .conversation_member OWNER TO " wire-server" ;
123+
124+ --
125+ -- Name: local_conversation_remote_member; Type: TABLE; Schema: public; Owner: wire-server
126+ --
127+
128+ CREATE TABLE public .local_conversation_remote_member (
129+ conv uuid NOT NULL ,
130+ user_remote_domain text NOT NULL ,
131+ user_remote_id uuid NOT NULL ,
132+ conversation_role text
133+ );
134+
135+
136+ ALTER TABLE public .local_conversation_remote_member OWNER TO " wire-server" ;
137+
138+ --
139+ -- Name: mls_group_member_client; Type: TABLE; Schema: public; Owner: wire-server
140+ --
141+
142+ CREATE TABLE public .mls_group_member_client (
143+ group_id bytea NOT NULL ,
144+ user_domain text NOT NULL ,
145+ " user" uuid NOT NULL ,
146+ client text NOT NULL ,
147+ leaf_node_index integer NOT NULL ,
148+ removal_pending boolean NOT NULL
149+ );
150+
151+
152+ ALTER TABLE public .mls_group_member_client OWNER TO " wire-server" ;
153+
154+ --
155+ -- Name: remote_conversation_local_member; Type: TABLE; Schema: public; Owner: wire-server
156+ --
157+
158+ CREATE TABLE public .remote_conversation_local_member (
159+ " user" uuid NOT NULL ,
160+ conv_remote_domain text NOT NULL ,
161+ conv_remote_id uuid NOT NULL ,
162+ hidden boolean ,
163+ hidden_ref text ,
164+ otr_archived boolean ,
165+ otr_archived_ref text ,
166+ otr_muted_ref text ,
167+ otr_muted_status integer
168+ );
169+
170+
171+ ALTER TABLE public .remote_conversation_local_member OWNER TO " wire-server" ;
172+
71173--
72174-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: wire-server
73175--
@@ -81,6 +183,23 @@ CREATE TABLE public.schema_migrations (
81183
82184ALTER TABLE public .schema_migrations OWNER TO " wire-server" ;
83185
186+ --
187+ -- Name: subconversation; Type: TABLE; Schema: public; Owner: wire-server
188+ --
189+
190+ CREATE TABLE public .subconversation (
191+ conv_id uuid NOT NULL ,
192+ subconv_id text NOT NULL ,
193+ cipher_suite integer ,
194+ epoch bigint NOT NULL ,
195+ epoch_timestamp timestamp with time zone NOT NULL ,
196+ group_id bytea NOT NULL ,
197+ public_group_state bytea
198+ );
199+
200+
201+ ALTER TABLE public .subconversation OWNER TO " wire-server" ;
202+
84203--
85204-- Name: user_group; Type: TABLE; Schema: public; Owner: wire-server
86205--
@@ -136,6 +255,54 @@ ALTER TABLE ONLY public.collaborators
136255 ADD CONSTRAINT collaborators_pkey PRIMARY KEY (user_id, team_id);
137256
138257
258+ --
259+ -- Name: conversation_member conversation_member_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
260+ --
261+
262+ ALTER TABLE ONLY public .conversation_member
263+ ADD CONSTRAINT conversation_member_pkey PRIMARY KEY (conv, " user" );
264+
265+
266+ --
267+ -- Name: conversation conversation_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
268+ --
269+
270+ ALTER TABLE ONLY public .conversation
271+ ADD CONSTRAINT conversation_pkey PRIMARY KEY (id);
272+
273+
274+ --
275+ -- Name: local_conversation_remote_member local_conversation_remote_member_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
276+ --
277+
278+ ALTER TABLE ONLY public .local_conversation_remote_member
279+ ADD CONSTRAINT local_conversation_remote_member_pkey PRIMARY KEY (conv, user_remote_domain, user_remote_id);
280+
281+
282+ --
283+ -- Name: mls_group_member_client mls_group_member_client_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
284+ --
285+
286+ ALTER TABLE ONLY public .mls_group_member_client
287+ ADD CONSTRAINT mls_group_member_client_pkey PRIMARY KEY (group_id, user_domain, " user" , client);
288+
289+
290+ --
291+ -- Name: remote_conversation_local_member remote_conversation_local_member_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
292+ --
293+
294+ ALTER TABLE ONLY public .remote_conversation_local_member
295+ ADD CONSTRAINT remote_conversation_local_member_pkey PRIMARY KEY (" user" , conv_remote_domain, conv_remote_id);
296+
297+
298+ --
299+ -- Name: subconversation subconversation_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
300+ --
301+
302+ ALTER TABLE ONLY public .subconversation
303+ ADD CONSTRAINT subconversation_pkey PRIMARY KEY (conv_id, subconv_id);
304+
305+
139306--
140307-- Name: user_group_channel user_group_channel_pkey; Type: CONSTRAINT; Schema: public; Owner: wire-server
141308--
@@ -182,13 +349,43 @@ CREATE INDEX collaborators_team_id_idx ON public.collaborators USING btree (team
182349CREATE INDEX collaborators_user_id_idx ON public .collaborators USING btree (user_id);
183350
184351
352+ --
353+ -- Name: conversation_member_user_idx; Type: INDEX; Schema: public; Owner: wire-server
354+ --
355+
356+ CREATE INDEX conversation_member_user_idx ON public .conversation_member USING btree (" user" );
357+
358+
359+ --
360+ -- Name: conversation_team_idx; Type: INDEX; Schema: public; Owner: wire-server
361+ --
362+
363+ CREATE INDEX conversation_team_idx ON public .conversation USING btree (team);
364+
365+
185366--
186367-- Name: user_group_member_user_id_idx; Type: INDEX; Schema: public; Owner: wire-server
187368--
188369
189370CREATE INDEX user_group_member_user_id_idx ON public .user_group_member USING btree (user_id);
190371
191372
373+ --
374+ -- Name: conversation_member conversation_member_conv_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wire-server
375+ --
376+
377+ ALTER TABLE ONLY public .conversation_member
378+ ADD CONSTRAINT conversation_member_conv_fkey FOREIGN KEY (conv) REFERENCES public .conversation (id) ON DELETE CASCADE ;
379+
380+
381+ --
382+ -- Name: conversation conversation_parent_conv_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wire-server
383+ --
384+
385+ ALTER TABLE ONLY public .conversation
386+ ADD CONSTRAINT conversation_parent_conv_fkey FOREIGN KEY (parent_conv) REFERENCES public .conversation (id) ON DELETE CASCADE ;
387+
388+
192389--
193390-- Name: user_group_member fk_user_group; Type: FK CONSTRAINT; Schema: public; Owner: wire-server
194391--
@@ -205,6 +402,22 @@ ALTER TABLE ONLY public.user_group_channel
205402 ADD CONSTRAINT fk_user_group_channel FOREIGN KEY (user_group_id) REFERENCES public .user_group (id) ON DELETE CASCADE ;
206403
207404
405+ --
406+ -- Name: local_conversation_remote_member local_conversation_remote_member_conv_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wire-server
407+ --
408+
409+ ALTER TABLE ONLY public .local_conversation_remote_member
410+ ADD CONSTRAINT local_conversation_remote_member_conv_fkey FOREIGN KEY (conv) REFERENCES public .conversation (id) ON DELETE CASCADE ;
411+
412+
413+ --
414+ -- Name: subconversation subconversation_conv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: wire-server
415+ --
416+
417+ ALTER TABLE ONLY public .subconversation
418+ ADD CONSTRAINT subconversation_conv_id_fkey FOREIGN KEY (conv_id) REFERENCES public .conversation (id) ON DELETE CASCADE ;
419+
420+
208421--
209422-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: wire-server
210423--
@@ -215,3 +428,5 @@ REVOKE USAGE ON SCHEMA public FROM PUBLIC;
215428--
216429-- PostgreSQL database dump complete
217430--
431+
432+ \unrestrict Hl9XxATRAdecxBiFt8PPZgKxbcBTtxdglRrKHEan0Af69hORYkknDeYWBzNNCd6
0 commit comments