| is_cancelled boolean DEFAULT false NOT NULL, | | is_cancelled boolean DEFAULT false NOT NULL, |
| is_deleted boolean DEFAULT false NOT NULL, | | is_deleted boolean DEFAULT false NOT NULL, |
| moderation_state_id bigint NOT NULL, | | moderation_state_id bigint NOT NULL, |
| n | timezone character varying NOT NULL, | n | timezone character varying NOT NULL |
| thread_id bigint NOT NULL | | |
| ); | | ); |
| | | |
| CREATE TABLE public.event_organizers ( | | CREATE TABLE public.event_organizers ( |
| ALTER TABLE ONLY public.event_occurrence_attendees | | ALTER TABLE ONLY public.event_occurrence_attendees |
| ADD CONSTRAINT uq_event_occurrence_attendees_occurrence_id UNIQUE (occurrence_id, user_id); | | ADD CONSTRAINT uq_event_occurrence_attendees_occurrence_id UNIQUE (occurrence_id, user_id); |
| | | |
| n | ALTER TABLE ONLY public.event_occurrences | n | |
| ADD CONSTRAINT uq_event_occurrences_thread_id UNIQUE (thread_id); | | |
| | | |
| ALTER TABLE ONLY public.event_organizers | | ALTER TABLE ONLY public.event_organizers |
| ADD CONSTRAINT uq_event_organizers_event_id UNIQUE (event_id, user_id); | | ADD CONSTRAINT uq_event_organizers_event_id UNIQUE (event_id, user_id); |
| | | |
| ALTER TABLE ONLY public.event_subscriptions | | ALTER TABLE ONLY public.event_subscriptions |
| ADD CONSTRAINT uq_event_subscriptions_event_id UNIQUE (event_id, user_id); | | ADD CONSTRAINT uq_event_subscriptions_event_id UNIQUE (event_id, user_id); |
| | | |
| n | | n | ALTER TABLE ONLY public.events |
| | | ADD CONSTRAINT uq_events_thread_id UNIQUE (thread_id); |
| | | |
| ALTER TABLE ONLY public.invoices | | ALTER TABLE ONLY public.invoices |
| ADD CONSTRAINT uq_invoices_stripe_payment_intent_id UNIQUE (stripe_payment_intent_id); | | ADD CONSTRAINT uq_invoices_stripe_payment_intent_id UNIQUE (stripe_payment_intent_id); |
| | | |
| ALTER TABLE ONLY public.event_occurrences | | ALTER TABLE ONLY public.event_occurrences |
| ADD CONSTRAINT fk_event_occurrences_photo_key_uploads FOREIGN KEY (photo_key) REFERENCES public. | | ADD CONSTRAINT fk_event_occurrences_photo_key_uploads FOREIGN KEY (photo_key) REFERENCES public. |
| uploads(key); | | uploads(key); |
| | | |
| n | ALTER TABLE ONLY public.event_occurrences | n | |
| ADD CONSTRAINT fk_event_occurrences_thread_id_threads FOREIGN KEY (thread_id) REFERENCES public. | | |
| threads(id); | | |
| | | |
| ALTER TABLE ONLY public.event_organizers | | ALTER TABLE ONLY public.event_organizers |
| ADD CONSTRAINT fk_event_organizers_event_id_events FOREIGN KEY (event_id) REFERENCES public.even | | ADD CONSTRAINT fk_event_organizers_event_id_events FOREIGN KEY (event_id) REFERENCES public.even |
| ts(id); | | ts(id); |
| | | |
| ALTER TABLE ONLY public.events | | ALTER TABLE ONLY public.events |
| ADD CONSTRAINT fk_events_parent_node_id_nodes FOREIGN KEY (parent_node_id) REFERENCES public.nod | | ADD CONSTRAINT fk_events_parent_node_id_nodes FOREIGN KEY (parent_node_id) REFERENCES public.nod |
| es(id); | | es(id); |
| | | |
| t | | t | ALTER TABLE ONLY public.events |
| | | ADD CONSTRAINT fk_events_thread_id_threads FOREIGN KEY (thread_id) REFERENCES public.threads(id) |
| | | ; |
| | | |
| ALTER TABLE ONLY public.friend_relationships | | ALTER TABLE ONLY public.friend_relationships |
| ADD CONSTRAINT fk_friend_relationships_from_user_id_users FOREIGN KEY (from_user_id) REFERENCES | | ADD CONSTRAINT fk_friend_relationships_from_user_id_users FOREIGN KEY (from_user_id) REFERENCES |
| public.users(id); | | public.users(id); |
| | | |