X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/83a4e42fb15030a9108e76dcf01a1a7d6c14cda5..f79536fda9dc40f480383caa69a35663702b2ba4:/services/api/db/structure.sql diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql index 7ee7ea6ff9..e25a2a9605 100644 --- a/services/api/db/structure.sql +++ b/services/api/db/structure.sql @@ -169,8 +169,10 @@ CREATE TABLE collections ( name character varying(255), description character varying(524288), properties text, - expires_at timestamp without time zone, - file_names character varying(8192) + delete_at timestamp without time zone, + file_names character varying(8192), + trash_at timestamp without time zone, + is_trashed boolean DEFAULT false NOT NULL ); @@ -294,7 +296,9 @@ CREATE TABLE container_requests ( use_existing boolean DEFAULT true, scheduling_parameters text, output_uuid character varying(255), - log_uuid character varying(255) + log_uuid character varying(255), + output_name character varying(255) DEFAULT NULL::character varying, + output_ttl integer DEFAULT 0 NOT NULL ); @@ -1495,13 +1499,6 @@ CREATE INDEX api_clients_search_index ON api_clients USING btree (uuid, owner_uu CREATE INDEX authorized_keys_search_index ON authorized_keys USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, key_type, authorized_user_uuid); --- --- Name: collection_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX collection_owner_uuid_name_unique ON collections USING btree (owner_uuid, name) WHERE (expires_at IS NULL); - - -- -- Name: collections_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -1520,14 +1517,14 @@ CREATE INDEX collections_search_index ON collections USING btree (owner_uuid, mo -- Name: container_requests_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: -- -CREATE INDEX container_requests_full_text_search_idx ON container_requests USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)) || ' '::text) || COALESCE(properties, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(requesting_container_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(container_uuid, ''::character varying))::text) || ' '::text) || COALESCE(mounts, ''::text)) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(container_image, ''::character varying))::text) || ' '::text) || COALESCE(environment, ''::text)) || ' '::text) || (COALESCE(cwd, ''::character varying))::text) || ' '::text) || COALESCE(command, ''::text)) || ' '::text) || (COALESCE(output_path, ''::character varying))::text) || ' '::text) || COALESCE(filters, ''::text)) || ' '::text) || COALESCE(scheduling_parameters, ''::text)) || ' '::text) || (COALESCE(output_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log_uuid, ''::character varying))::text))); +CREATE INDEX container_requests_full_text_search_idx ON container_requests USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)) || ' '::text) || COALESCE(properties, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(requesting_container_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(container_uuid, ''::character varying))::text) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(container_image, ''::character varying))::text) || ' '::text) || COALESCE(environment, ''::text)) || ' '::text) || (COALESCE(cwd, ''::character varying))::text) || ' '::text) || COALESCE(command, ''::text)) || ' '::text) || (COALESCE(output_path, ''::character varying))::text) || ' '::text) || COALESCE(filters, ''::text)) || ' '::text) || COALESCE(scheduling_parameters, ''::text)) || ' '::text) || (COALESCE(output_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(output_name, ''::character varying))::text))); -- -- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: -- -CREATE INDEX container_requests_search_index ON container_requests USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, state, requesting_container_uuid, container_uuid, container_image, cwd, output_path, output_uuid, log_uuid); +CREATE INDEX container_requests_search_index ON container_requests USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, state, requesting_container_uuid, container_uuid, container_image, cwd, output_path, output_uuid, log_uuid, output_name); -- @@ -1656,6 +1653,20 @@ CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON authorized_keys USING btree CREATE INDEX index_collections_on_created_at ON collections USING btree (created_at); +-- +-- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_collections_on_delete_at ON collections USING btree (delete_at); + + +-- +-- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_collections_on_is_trashed ON collections USING btree (is_trashed); + + -- -- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -1670,6 +1681,27 @@ CREATE INDEX index_collections_on_modified_at ON collections USING btree (modifi CREATE INDEX index_collections_on_owner_uuid ON collections USING btree (owner_uuid); +-- +-- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE UNIQUE INDEX index_collections_on_owner_uuid_and_name ON collections USING btree (owner_uuid, name) WHERE (is_trashed = false); + + +-- +-- Name: index_collections_on_portable_data_hash; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_collections_on_portable_data_hash ON collections USING btree (portable_data_hash); + + +-- +-- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -; Tablespace: +-- + +CREATE INDEX index_collections_on_trash_at ON collections USING btree (trash_at); + + -- -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: -- @@ -2416,7 +2448,7 @@ CREATE INDEX virtual_machines_search_index ON virtual_machines USING btree (uuid -- Name: workflows_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: -- -CREATE INDEX workflows_full_text_search_idx ON workflows USING gin (to_tsvector('english'::regconfig, (((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)) || ' '::text) || COALESCE(definition, ''::text)))); +CREATE INDEX workflows_full_text_search_idx ON workflows USING gin (to_tsvector('english'::regconfig, (((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)))); -- @@ -2706,4 +2738,22 @@ INSERT INTO schema_migrations (version) VALUES ('20161115171221'); INSERT INTO schema_migrations (version) VALUES ('20161115174218'); -INSERT INTO schema_migrations (version) VALUES ('20161213172944'); \ No newline at end of file +INSERT INTO schema_migrations (version) VALUES ('20161213172944'); + +INSERT INTO schema_migrations (version) VALUES ('20161222153434'); + +INSERT INTO schema_migrations (version) VALUES ('20161223090712'); + +INSERT INTO schema_migrations (version) VALUES ('20170102153111'); + +INSERT INTO schema_migrations (version) VALUES ('20170105160301'); + +INSERT INTO schema_migrations (version) VALUES ('20170105160302'); + +INSERT INTO schema_migrations (version) VALUES ('20170216170823'); + +INSERT INTO schema_migrations (version) VALUES ('20170301225558'); + +INSERT INTO schema_migrations (version) VALUES ('20170328215436'); + +INSERT INTO schema_migrations (version) VALUES ('20170330012505'); \ No newline at end of file