@@ -155,6 +155,74 @@ CREATE SEQUENCE comments_id_seq
155155ALTER SEQUENCE comments_id_seq OWNED BY comments .id ;
156156
157157
158+ --
159+ -- Name: conversation_parts; Type: TABLE; Schema: public; Owner: -
160+ --
161+
162+ CREATE TABLE conversation_parts (
163+ id bigint NOT NULL ,
164+ body text NOT NULL ,
165+ read_at timestamp without time zone ,
166+ author_id bigint ,
167+ conversation_id bigint ,
168+ inserted_at timestamp without time zone NOT NULL ,
169+ updated_at timestamp without time zone NOT NULL
170+ );
171+
172+
173+ --
174+ -- Name: conversation_parts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
175+ --
176+
177+ CREATE SEQUENCE conversation_parts_id_seq
178+ START WITH 1
179+ INCREMENT BY 1
180+ NO MINVALUE
181+ NO MAXVALUE
182+ CACHE 1 ;
183+
184+
185+ --
186+ -- Name: conversation_parts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
187+ --
188+
189+ ALTER SEQUENCE conversation_parts_id_seq OWNED BY conversation_parts .id ;
190+
191+
192+ --
193+ -- Name: conversations; Type: TABLE; Schema: public; Owner: -
194+ --
195+
196+ CREATE TABLE conversations (
197+ id bigint NOT NULL ,
198+ status character varying (255 ) DEFAULT ' open' ::character varying NOT NULL ,
199+ read_at timestamp without time zone ,
200+ message_id bigint ,
201+ user_id bigint ,
202+ inserted_at timestamp without time zone NOT NULL ,
203+ updated_at timestamp without time zone NOT NULL
204+ );
205+
206+
207+ --
208+ -- Name: conversations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
209+ --
210+
211+ CREATE SEQUENCE conversations_id_seq
212+ START WITH 1
213+ INCREMENT BY 1
214+ NO MINVALUE
215+ NO MAXVALUE
216+ CACHE 1 ;
217+
218+
219+ --
220+ -- Name: conversations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
221+ --
222+
223+ ALTER SEQUENCE conversations_id_seq OWNED BY conversations .id ;
224+
225+
158226--
159227-- Name: donation_goals; Type: TABLE; Schema: public; Owner: -
160228--
@@ -1826,6 +1894,20 @@ ALTER TABLE ONLY categories ALTER COLUMN id SET DEFAULT nextval('categories_id_s
18261894ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval(' comments_id_seq' ::regclass);
18271895
18281896
1897+ --
1898+ -- Name: conversation_parts id; Type: DEFAULT; Schema: public; Owner: -
1899+ --
1900+
1901+ ALTER TABLE ONLY conversation_parts ALTER COLUMN id SET DEFAULT nextval(' conversation_parts_id_seq' ::regclass);
1902+
1903+
1904+ --
1905+ -- Name: conversations id; Type: DEFAULT; Schema: public; Owner: -
1906+ --
1907+
1908+ ALTER TABLE ONLY conversations ALTER COLUMN id SET DEFAULT nextval(' conversations_id_seq' ::regclass);
1909+
1910+
18291911--
18301912-- Name: donation_goals id; Type: DEFAULT; Schema: public; Owner: -
18311913--
@@ -2144,6 +2226,22 @@ ALTER TABLE ONLY comments
21442226 ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
21452227
21462228
2229+ --
2230+ -- Name: conversation_parts conversation_parts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2231+ --
2232+
2233+ ALTER TABLE ONLY conversation_parts
2234+ ADD CONSTRAINT conversation_parts_pkey PRIMARY KEY (id);
2235+
2236+
2237+ --
2238+ -- Name: conversations conversations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2239+ --
2240+
2241+ ALTER TABLE ONLY conversations
2242+ ADD CONSTRAINT conversations_pkey PRIMARY KEY (id);
2243+
2244+
21472245--
21482246-- Name: donation_goals donation_goals_pkey; Type: CONSTRAINT; Schema: public; Owner: -
21492247--
@@ -2475,6 +2573,41 @@ CREATE INDEX comments_task_id_index ON comments USING btree (task_id);
24752573CREATE INDEX comments_user_id_index ON comments USING btree (user_id);
24762574
24772575
2576+ --
2577+ -- Name: conversation_parts_author_id_index; Type: INDEX; Schema: public; Owner: -
2578+ --
2579+
2580+ CREATE INDEX conversation_parts_author_id_index ON conversation_parts USING btree (author_id);
2581+
2582+
2583+ --
2584+ -- Name: conversation_parts_conversation_id_index; Type: INDEX; Schema: public; Owner: -
2585+ --
2586+
2587+ CREATE INDEX conversation_parts_conversation_id_index ON conversation_parts USING btree (conversation_id);
2588+
2589+
2590+ --
2591+ -- Name: conversations_message_id_index; Type: INDEX; Schema: public; Owner: -
2592+ --
2593+
2594+ CREATE INDEX conversations_message_id_index ON conversations USING btree (message_id);
2595+
2596+
2597+ --
2598+ -- Name: conversations_status_index; Type: INDEX; Schema: public; Owner: -
2599+ --
2600+
2601+ CREATE INDEX conversations_status_index ON conversations USING btree (status);
2602+
2603+
2604+ --
2605+ -- Name: conversations_user_id_index; Type: INDEX; Schema: public; Owner: -
2606+ --
2607+
2608+ CREATE INDEX conversations_user_id_index ON conversations USING btree (user_id);
2609+
2610+
24782611--
24792612-- Name: donation_goals_current_unique_to_project; Type: INDEX; Schema: public; Owner: -
24802613--
@@ -3445,6 +3578,38 @@ ALTER TABLE ONLY comments
34453578 ADD CONSTRAINT comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
34463579
34473580
3581+ --
3582+ -- Name: conversation_parts conversation_parts_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
3583+ --
3584+
3585+ ALTER TABLE ONLY conversation_parts
3586+ ADD CONSTRAINT conversation_parts_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
3587+
3588+
3589+ --
3590+ -- Name: conversation_parts conversation_parts_conversation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
3591+ --
3592+
3593+ ALTER TABLE ONLY conversation_parts
3594+ ADD CONSTRAINT conversation_parts_conversation_id_fkey FOREIGN KEY (conversation_id) REFERENCES conversations(id);
3595+
3596+
3597+ --
3598+ -- Name: conversations conversations_message_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
3599+ --
3600+
3601+ ALTER TABLE ONLY conversations
3602+ ADD CONSTRAINT conversations_message_id_fkey FOREIGN KEY (message_id) REFERENCES messages(id);
3603+
3604+
3605+ --
3606+ -- Name: conversations conversations_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
3607+ --
3608+
3609+ ALTER TABLE ONLY conversations
3610+ ADD CONSTRAINT conversations_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
3611+
3612+
34483613--
34493614-- Name: donation_goals donation_goals_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
34503615--
@@ -3993,5 +4158,5 @@ ALTER TABLE ONLY users
39934158-- PostgreSQL database dump complete
39944159--
39954160
3996- INSERT INTO "schema_migrations" (version) VALUES (20160723215749), (20160804000000), (20160804001111), (20160805132301), (20160805203929), (20160808143454), (20160809214736), (20160810124357), (20160815125009), (20160815143002), (20160816020347), (20160816034021), (20160817220118), (20160818000944), (20160818132546), (20160820113856), (20160820164905), (20160822002438), (20160822004056), (20160822011624), (20160822020401), (20160822044612), (20160830081224), (20160830224802), (20160911233738), (20160912002705), (20160912145957), (20160918003206), (20160928232404), (20161003185918), (20161019090945), (20161019110737), (20161020144622), (20161021131026), (20161031001615), (20161121005339), (20161121014050), (20161121043941), (20161121045709), (20161122015942), (20161123081114), (20161123150943), (20161124085742), (20161125200620), (20161126045705), (20161127054559), (20161205024856), (20161207112519), (20161209192504), (20161212005641), (20161214005935), (20161215052051), (20161216051447), (20161218005913), (20161219160401), (20161219163909), (20161220141753), (20161221085759), (20161226213600), (20161231063614), (20170102130055), (20170102181053), (20170104113708), (20170104212623), (20170104235423), (20170106013143), (20170115035159), (20170115230549), (20170121014100), (20170131234029), (20170201014901), (20170201025454), (20170201035458), (20170201183258), (20170220032224), (20170224233516), (20170226050552), (20170228085250), (20170308214128), (20170308220713), (20170308222552), (20170313130611), (20170318032449), (20170318082740), (20170324194827), (20170424215355), (20170501225441), (20170505224222), (20170526095401), (20170602000208), (20170622205732), (20170626231059), (20170628092119), (20170628213609), (20170629183404), (20170630140136), (20170706132431), (20170707213648), (20170711122252), (20170717092127), (20170725060612), (20170727052644), (20170731130121), (20170814131722), (20170913114958), (20170921014405), (20170925214512), (20170925230419), (20170926134646), (20170927100300), (20170928234412), (20171003134956), (20171003225853), (20171006063358), (20171006161407), (20171012215106), (20171012221231), (20171016125229), (20171016125516), (20171016223356), (20171016235656), (20171017235433), (20171019191035), (20171025184225), (20171026010933), (20171027061833), (20171028011642), (20171028173508), (20171030182857), (20171031232023), (20171031234356), (20171101023309), (20171104013543), (20171106045740), (20171106050209), (20171106103153), (20171106200036), (20171109231538), (20171110001134), (20171114010851), (20171114033357), (20171114225214), (20171114225713), (20171114232534), (20171115201624), (20171115225358), (20171119004204), (20171121075226), (20171121144138), (20171123065902), (20171127215847), (20171201073818), (20171205161052);
4161+ INSERT INTO "schema_migrations" (version) VALUES (20160723215749), (20160804000000), (20160804001111), (20160805132301), (20160805203929), (20160808143454), (20160809214736), (20160810124357), (20160815125009), (20160815143002), (20160816020347), (20160816034021), (20160817220118), (20160818000944), (20160818132546), (20160820113856), (20160820164905), (20160822002438), (20160822004056), (20160822011624), (20160822020401), (20160822044612), (20160830081224), (20160830224802), (20160911233738), (20160912002705), (20160912145957), (20160918003206), (20160928232404), (20161003185918), (20161019090945), (20161019110737), (20161020144622), (20161021131026), (20161031001615), (20161121005339), (20161121014050), (20161121043941), (20161121045709), (20161122015942), (20161123081114), (20161123150943), (20161124085742), (20161125200620), (20161126045705), (20161127054559), (20161205024856), (20161207112519), (20161209192504), (20161212005641), (20161214005935), (20161215052051), (20161216051447), (20161218005913), (20161219160401), (20161219163909), (20161220141753), (20161221085759), (20161226213600), (20161231063614), (20170102130055), (20170102181053), (20170104113708), (20170104212623), (20170104235423), (20170106013143), (20170115035159), (20170115230549), (20170121014100), (20170131234029), (20170201014901), (20170201025454), (20170201035458), (20170201183258), (20170220032224), (20170224233516), (20170226050552), (20170228085250), (20170308214128), (20170308220713), (20170308222552), (20170313130611), (20170318032449), (20170318082740), (20170324194827), (20170424215355), (20170501225441), (20170505224222), (20170526095401), (20170602000208), (20170622205732), (20170626231059), (20170628092119), (20170628213609), (20170629183404), (20170630140136), (20170706132431), (20170707213648), (20170711122252), (20170717092127), (20170725060612), (20170727052644), (20170731130121), (20170814131722), (20170913114958), (20170921014405), (20170925214512), (20170925230419), (20170926134646), (20170927100300), (20170928234412), (20171003134956), (20171003225853), (20171006063358), (20171006161407), (20171012215106), (20171012221231), (20171016125229), (20171016125516), (20171016223356), (20171016235656), (20171017235433), (20171019191035), (20171025184225), (20171026010933), (20171027061833), (20171028011642), (20171028173508), (20171030182857), (20171031232023), (20171031234356), (20171101023309), (20171104013543), (20171106045740), (20171106050209), (20171106103153), (20171106200036), (20171109231538), (20171110001134), (20171114010851), (20171114033357), (20171114225214), (20171114225713), (20171114232534), (20171115201624), (20171115225358), (20171119004204), (20171121075226), (20171121144138), (20171123065902), (20171127215847), (20171201073818), (20171205161052), (20171213062707);
39974162
0 commit comments