From fa4660d819ed4c9b7ff020bd51960d5ed94574cf Mon Sep 17 00:00:00 2001 From: bilal Date: Tue, 16 Jun 2020 17:24:40 +0200 Subject: [PATCH] rebase master --- db/structure.sql | 100 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 31 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index 204f848..f6a1918 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9,20 +9,6 @@ SET xmloption = content; SET client_min_messages = warning; SET row_security = off; --- --- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - --- - -CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; - - --- --- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; - - -- -- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: - -- @@ -331,6 +317,7 @@ CREATE TABLE public.appearance_releases ( person_last_name character varying, guardian_first_name character varying, guardian_last_name character varying, + identifier character varying, guardian_email character varying ); @@ -886,6 +873,37 @@ CREATE SEQUENCE public.location_releases_id_seq ALTER SEQUENCE public.location_releases_id_seq OWNED BY public.location_releases.id; +-- +-- Name: matching_requests; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.matching_requests ( + id bigint NOT NULL, + project_id bigint, + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL +); + + +-- +-- Name: matching_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.matching_requests_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: matching_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.matching_requests_id_seq OWNED BY public.matching_requests.id; + + -- -- Name: material_releases; Type: TABLE; Schema: public; Owner: - -- @@ -1253,6 +1271,7 @@ CREATE TABLE public.settings ( -- CREATE SEQUENCE public.settings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1288,6 +1307,7 @@ CREATE TABLE public.taggings ( -- CREATE SEQUENCE public.taggings_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1318,6 +1338,7 @@ CREATE TABLE public.tags ( -- CREATE SEQUENCE public.tags_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1630,7 +1651,6 @@ CREATE TABLE public.zoom_meetings ( api_meeting_id character varying, created_at timestamp(6) without time zone NOT NULL, updated_at timestamp(6) without time zone NOT NULL, - broadcast_id bigint, zoom_user_id bigint, project_id bigint, status integer DEFAULT 0 @@ -1829,6 +1849,13 @@ ALTER TABLE ONLY public.imports ALTER COLUMN id SET DEFAULT nextval('public.impo ALTER TABLE ONLY public.location_releases ALTER COLUMN id SET DEFAULT nextval('public.location_releases_id_seq'::regclass); +-- +-- Name: matching_requests id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.matching_requests ALTER COLUMN id SET DEFAULT nextval('public.matching_requests_id_seq'::regclass); + + -- -- Name: material_releases id; Type: DEFAULT; Schema: public; Owner: - -- @@ -2137,6 +2164,14 @@ ALTER TABLE ONLY public.location_releases ADD CONSTRAINT location_releases_pkey PRIMARY KEY (id); +-- +-- Name: matching_requests matching_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.matching_requests + ADD CONSTRAINT matching_requests_pkey PRIMARY KEY (id); + + -- -- Name: material_releases material_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -2606,6 +2641,13 @@ CREATE INDEX index_location_releases_on_term_id ON public.location_releases USIN CREATE INDEX index_location_releases_on_territory_id ON public.location_releases USING btree (territory_id); +-- +-- Name: index_matching_requests_on_project_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_matching_requests_on_project_id ON public.matching_requests USING btree (project_id); + + -- -- Name: index_material_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: - -- @@ -2935,13 +2977,6 @@ CREATE INDEX index_videos_on_audio_analysis_uid ON public.videos USING btree (au CREATE INDEX index_videos_on_project_id ON public.videos USING btree (project_id); --- --- Name: index_zoom_meetings_on_broadcast_id; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_zoom_meetings_on_broadcast_id ON public.zoom_meetings USING btree (broadcast_id); - - -- -- Name: index_zoom_meetings_on_project_id; Type: INDEX; Schema: public; Owner: - -- @@ -3250,6 +3285,14 @@ ALTER TABLE ONLY public.material_releases ADD CONSTRAINT fk_rails_6b945b36b9 FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id); +-- +-- Name: matching_requests fk_rails_71d16e64c8; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.matching_requests + ADD CONSTRAINT fk_rails_71d16e64c8 FOREIGN KEY (project_id) REFERENCES public.projects(id); + + -- -- Name: appearance_releases fk_rails_7a58302526; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -3282,14 +3325,6 @@ ALTER TABLE ONLY public.music_releases ADD CONSTRAINT fk_rails_890d967673 FOREIGN KEY (territory_id) REFERENCES public.territories(id); --- --- Name: zoom_meetings fk_rails_8d814ea729; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.zoom_meetings - ADD CONSTRAINT fk_rails_8d814ea729 FOREIGN KEY (broadcast_id) REFERENCES public.broadcasts(id); - - -- -- Name: medical_releases fk_rails_98aa92daa9; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -3609,6 +3644,8 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200424161117'), ('20200427073429'), ('20200428091105'), +('20200430151828'), +('20200430190412'), ('20200507110804'), ('20200512161738'), ('20200526113516'), @@ -3616,6 +3653,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200606044747'), ('20200610085411'), ('20200610140459'), -('20200612121539'); +('20200612121539'), +('20200615131722');