@@ -777,6 +777,38 @@ CREATE TABLE public.diary_entry_subscriptions (
777
777
);
778
778
779
779
780
+ --
781
+ -- Name: event_organizers; Type: TABLE; Schema: public; Owner: -
782
+ --
783
+
784
+ CREATE TABLE public .event_organizers (
785
+ id bigint NOT NULL ,
786
+ event_id bigint NOT NULL ,
787
+ user_id bigint NOT NULL ,
788
+ created_at timestamp (6 ) without time zone NOT NULL ,
789
+ updated_at timestamp (6 ) without time zone NOT NULL
790
+ );
791
+
792
+
793
+ --
794
+ -- Name: event_organizers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
795
+ --
796
+
797
+ CREATE SEQUENCE public .event_organizers_id_seq
798
+ START WITH 1
799
+ INCREMENT BY 1
800
+ NO MINVALUE
801
+ NO MAXVALUE
802
+ CACHE 1 ;
803
+
804
+
805
+ --
806
+ -- Name: event_organizers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
807
+ --
808
+
809
+ ALTER SEQUENCE public .event_organizers_id_seq OWNED BY public .event_organizers .id;
810
+
811
+
780
812
--
781
813
-- Name: events; Type: TABLE; Schema: public; Owner: -
782
814
--
@@ -1820,6 +1852,13 @@ ALTER TABLE ONLY public.diary_comments ALTER COLUMN id SET DEFAULT nextval('publ
1820
1852
ALTER TABLE ONLY public .diary_entries ALTER COLUMN id SET DEFAULT nextval(' public.diary_entries_id_seq' ::regclass);
1821
1853
1822
1854
1855
+ --
1856
+ -- Name: event_organizers id; Type: DEFAULT; Schema: public; Owner: -
1857
+ --
1858
+
1859
+ ALTER TABLE ONLY public .event_organizers ALTER COLUMN id SET DEFAULT nextval(' public.event_organizers_id_seq' ::regclass);
1860
+
1861
+
1823
1862
--
1824
1863
-- Name: events id; Type: DEFAULT; Schema: public; Owner: -
1825
1864
--
@@ -2151,6 +2190,14 @@ ALTER TABLE ONLY public.diary_entry_subscriptions
2151
2190
ADD CONSTRAINT diary_entry_subscriptions_pkey PRIMARY KEY (user_id, diary_entry_id);
2152
2191
2153
2192
2193
+ --
2194
+ -- Name: event_organizers event_organizers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2195
+ --
2196
+
2197
+ ALTER TABLE ONLY public .event_organizers
2198
+ ADD CONSTRAINT event_organizers_pkey PRIMARY KEY (id);
2199
+
2200
+
2154
2201
--
2155
2202
-- Name: events events_pkey; Type: CONSTRAINT; Schema: public; Owner: -
2156
2203
--
@@ -2715,6 +2762,20 @@ CREATE INDEX index_community_members_on_user_id ON public.community_members USIN
2715
2762
CREATE INDEX index_diary_entry_subscriptions_on_diary_entry_id ON public .diary_entry_subscriptions USING btree (diary_entry_id);
2716
2763
2717
2764
2765
+ --
2766
+ -- Name: index_event_organizers_on_event_id; Type: INDEX; Schema: public; Owner: -
2767
+ --
2768
+
2769
+ CREATE INDEX index_event_organizers_on_event_id ON public .event_organizers USING btree (event_id);
2770
+
2771
+
2772
+ --
2773
+ -- Name: index_event_organizers_on_user_id; Type: INDEX; Schema: public; Owner: -
2774
+ --
2775
+
2776
+ CREATE INDEX index_event_organizers_on_user_id ON public .event_organizers USING btree (user_id);
2777
+
2778
+
2718
2779
--
2719
2780
-- Name: index_events_on_community_id; Type: INDEX; Schema: public; Owner: -
2720
2781
--
@@ -3346,6 +3407,14 @@ ALTER TABLE ONLY public.active_storage_variant_records
3346
3407
ADD CONSTRAINT fk_rails_993965df05 FOREIGN KEY (blob_id) REFERENCES public .active_storage_blobs (id);
3347
3408
3348
3409
3410
+ --
3411
+ -- Name: event_organizers fk_rails_b1c2c61554; Type: FK CONSTRAINT; Schema: public; Owner: -
3412
+ --
3413
+
3414
+ ALTER TABLE ONLY public .event_organizers
3415
+ ADD CONSTRAINT fk_rails_b1c2c61554 FOREIGN KEY (user_id) REFERENCES public .users (id);
3416
+
3417
+
3349
3418
--
3350
3419
-- Name: oauth_access_grants fk_rails_b4b53e07b8; Type: FK CONSTRAINT; Schema: public; Owner: -
3351
3420
--
@@ -3354,6 +3423,14 @@ ALTER TABLE ONLY public.oauth_access_grants
3354
3423
ADD CONSTRAINT fk_rails_b4b53e07b8 FOREIGN KEY (application_id) REFERENCES public .oauth_applications (id) NOT VALID;
3355
3424
3356
3425
3426
+ --
3427
+ -- Name: event_organizers fk_rails_c1e082c91e; Type: FK CONSTRAINT; Schema: public; Owner: -
3428
+ --
3429
+
3430
+ ALTER TABLE ONLY public .event_organizers
3431
+ ADD CONSTRAINT fk_rails_c1e082c91e FOREIGN KEY (event_id) REFERENCES public .events (id);
3432
+
3433
+
3357
3434
--
3358
3435
-- Name: active_storage_attachments fk_rails_c3b3935057; Type: FK CONSTRAINT; Schema: public; Owner: -
3359
3436
--
@@ -3764,6 +3841,7 @@ INSERT INTO "schema_migrations" (version) VALUES
3764
3841
(' 20220821143545' ),
3765
3842
(' 20220925043305' ),
3766
3843
(' 20221008144036' ),
3844
+ (' 20221008224134' ),
3767
3845
(' 21' ),
3768
3846
(' 22' ),
3769
3847
(' 23' ),
0 commit comments