Fix structure.sql

This commit is contained in:
aignatov-bio 2019-11-14 16:01:11 +01:00
parent f428bc3921
commit 0801df6f9c

View file

@ -1345,75 +1345,6 @@ CREATE SEQUENCE public.repository_rows_id_seq
ALTER SEQUENCE public.repository_rows_id_seq OWNED BY public.repository_rows.id;
--
-- Name: repository_status_items; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.repository_status_items (
id bigint NOT NULL,
status character varying NOT NULL,
icon character varying NOT NULL,
repository_id bigint NOT NULL,
repository_column_id bigint NOT NULL,
created_by_id bigint,
last_modified_by_id bigint,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: repository_status_items_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.repository_status_items_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: repository_status_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.repository_status_items_id_seq OWNED BY public.repository_status_items.id;
--
-- Name: repository_status_values; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.repository_status_values (
id bigint NOT NULL,
created_by_id bigint,
last_modified_by_id bigint,
repository_status_item_id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: repository_status_values_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.repository_status_values_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: repository_status_values_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.repository_status_values_id_seq OWNED BY public.repository_status_values.id;
--
-- Name: repository_table_states; Type: TABLE; Schema: public; Owner: -
--
@ -2868,20 +2799,6 @@ ALTER TABLE ONLY public.repository_list_values ALTER COLUMN id SET DEFAULT nextv
ALTER TABLE ONLY public.repository_rows ALTER COLUMN id SET DEFAULT nextval('public.repository_rows_id_seq'::regclass);
--
-- Name: repository_status_items id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items ALTER COLUMN id SET DEFAULT nextval('public.repository_status_items_id_seq'::regclass);
--
-- Name: repository_status_values id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_values ALTER COLUMN id SET DEFAULT nextval('public.repository_status_values_id_seq'::regclass);
--
-- Name: repository_table_states id; Type: DEFAULT; Schema: public; Owner: -
--
@ -3414,22 +3331,6 @@ ALTER TABLE ONLY public.repository_rows
ADD CONSTRAINT repository_rows_pkey PRIMARY KEY (id);
--
-- Name: repository_status_items repository_status_items_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items
ADD CONSTRAINT repository_status_items_pkey PRIMARY KEY (id);
--
-- Name: repository_status_values repository_status_values_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_values
ADD CONSTRAINT repository_status_values_pkey PRIMARY KEY (id);
--
-- Name: repository_table_states repository_table_states_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -4202,13 +4103,6 @@ CREATE UNIQUE INDEX index_oauth_access_tokens_on_token ON public.oauth_access_to
CREATE UNIQUE INDEX index_oauth_applications_on_uid ON public.oauth_applications USING btree (uid);
--
-- Name: index_on_rep_status_type_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_on_rep_status_type_id ON public.repository_status_values USING btree (repository_status_item_id);
--
-- Name: index_projects_on_archived_by_id; Type: INDEX; Schema: public; Owner: -
--
@ -4608,55 +4502,6 @@ CREATE INDEX index_repository_rows_on_name ON public.repository_rows USING gin (
CREATE INDEX index_repository_rows_on_repository_id ON public.repository_rows USING btree (repository_id);
--
-- Name: index_repository_status_items_on_created_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_items_on_created_by_id ON public.repository_status_items USING btree (created_by_id);
--
-- Name: index_repository_status_items_on_last_modified_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_items_on_last_modified_by_id ON public.repository_status_items USING btree (last_modified_by_id);
--
-- Name: index_repository_status_items_on_repository_column_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_items_on_repository_column_id ON public.repository_status_items USING btree (repository_column_id);
--
-- Name: index_repository_status_items_on_repository_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_items_on_repository_id ON public.repository_status_items USING btree (repository_id);
--
-- Name: index_repository_status_items_on_status; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_items_on_status ON public.repository_status_items USING btree (status);
--
-- Name: index_repository_status_values_on_created_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_values_on_created_by_id ON public.repository_status_values USING btree (created_by_id);
--
-- Name: index_repository_status_values_on_last_modified_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_repository_status_values_on_last_modified_by_id ON public.repository_status_values USING btree (last_modified_by_id);
--
-- Name: index_repository_table_states_on_repository_id; Type: INDEX; Schema: public; Owner: -
--
@ -5371,14 +5216,6 @@ CREATE INDEX index_wopi_actions_on_extension_and_action ON public.wopi_actions U
CREATE INDEX index_zip_exports_on_user_id ON public.zip_exports USING btree (user_id);
--
-- Name: repository_status_items fk_rails_00642f1707; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items
ADD CONSTRAINT fk_rails_00642f1707 FOREIGN KEY (repository_id) REFERENCES public.repositories(id);
--
-- Name: sample_custom_fields fk_rails_01916e6992; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -5667,14 +5504,6 @@ ALTER TABLE ONLY public.experiments
ADD CONSTRAINT fk_rails_4a63cb023e FOREIGN KEY (archived_by_id) REFERENCES public.users(id);
--
-- Name: repository_status_values fk_rails_4cf67f9f1e; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_values
ADD CONSTRAINT fk_rails_4cf67f9f1e FOREIGN KEY (last_modified_by_id) REFERENCES public.users(id);
--
-- Name: experiments fk_rails_4d671c16af; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -5819,14 +5648,6 @@ ALTER TABLE ONLY public.wopi_actions
ADD CONSTRAINT fk_rails_736b4e5a7d FOREIGN KEY (wopi_app_id) REFERENCES public.wopi_apps(id);
--
-- Name: repository_status_items fk_rails_74e5e4cacc; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items
ADD CONSTRAINT fk_rails_74e5e4cacc FOREIGN KEY (repository_column_id) REFERENCES public.repository_columns(id);
--
-- Name: results fk_rails_79fcaa8e37; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -5851,14 +5672,6 @@ ALTER TABLE ONLY public.checklist_items
ADD CONSTRAINT fk_rails_7b68a8f1d8 FOREIGN KEY (created_by_id) REFERENCES public.users(id);
--
-- Name: repository_status_items fk_rails_7bc42f7363; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items
ADD CONSTRAINT fk_rails_7bc42f7363 FOREIGN KEY (last_modified_by_id) REFERENCES public.users(id);
--
-- Name: activities fk_rails_7e11bb717f; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -6035,14 +5848,6 @@ ALTER TABLE ONLY public.reports
ADD CONSTRAINT fk_rails_9a0a9c9bec FOREIGN KEY (project_id) REFERENCES public.projects(id);
--
-- Name: repository_status_items fk_rails_9acc03f846; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_items
ADD CONSTRAINT fk_rails_9acc03f846 FOREIGN KEY (created_by_id) REFERENCES public.users(id);
--
-- Name: results fk_rails_9be849c454; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -6051,14 +5856,6 @@ ALTER TABLE ONLY public.results
ADD CONSTRAINT fk_rails_9be849c454 FOREIGN KEY (archived_by_id) REFERENCES public.users(id);
--
-- Name: repository_status_values fk_rails_9d357798c5; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_values
ADD CONSTRAINT fk_rails_9d357798c5 FOREIGN KEY (created_by_id) REFERENCES public.users(id);
--
-- Name: step_tables fk_rails_9e0e7dea0d; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -6115,14 +5912,6 @@ ALTER TABLE ONLY public.custom_fields
ADD CONSTRAINT fk_rails_a25c0b1d1a FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: repository_status_values fk_rails_a3a2aede5b; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.repository_status_values
ADD CONSTRAINT fk_rails_a3a2aede5b FOREIGN KEY (repository_status_item_id) REFERENCES public.repository_status_items(id);
--
-- Name: result_assets fk_rails_a418904d39; Type: FK CONSTRAINT; Schema: public; Owner: -
--