X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/58e057254087f406ca4146da7031187487b0ddbc..adc4f013f7479f2bc9df527c723c88513da9329c:/services/api/db/structure.sql diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql index 59af57f75c..6e8b128c9e 100644 --- a/services/api/db/structure.sql +++ b/services/api/db/structure.sql @@ -206,7 +206,10 @@ select coalesce(max(case when containers.uuid = inherited_from then inherited else container_requests.priority * 1125899906842624::bigint - (extract(epoch from container_requests.created_at)*1000)::bigint end), 0) from container_requests left outer join containers on container_requests.requesting_container_uuid = containers.uuid - where container_requests.container_uuid = for_container_uuid and container_requests.state = 'Committed' and container_requests.priority > 0; + where container_requests.container_uuid = for_container_uuid and + container_requests.state = 'Committed' and + container_requests.priority > 0 and + container_requests.owner_uuid not in (select group_uuid from trashed_groups); $$; @@ -255,6 +258,24 @@ select upd_container_uuid, upd_priority from tab; $$; +-- +-- Name: jsonb_exists_all_inline_op(jsonb, text[]); Type: FUNCTION; Schema: public; Owner: - +-- + +CREATE FUNCTION public.jsonb_exists_all_inline_op(jsonb, text[]) RETURNS boolean + LANGUAGE sql IMMUTABLE + AS $_$SELECT $1 ?& $2$_$; + + +-- +-- Name: jsonb_exists_inline_op(jsonb, text); Type: FUNCTION; Schema: public; Owner: - +-- + +CREATE FUNCTION public.jsonb_exists_inline_op(jsonb, text) RETURNS boolean + LANGUAGE sql IMMUTABLE + AS $_$SELECT $1 ? $2$_$; + + -- -- Name: project_subtree_with_is_frozen(character varying, boolean); Type: FUNCTION; Schema: public; Owner: - -- @@ -321,6 +342,30 @@ SET default_tablespace = ''; SET default_with_oids = false; +-- +-- Name: groups; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.groups ( + id bigint NOT NULL, + uuid character varying(255), + owner_uuid character varying(255), + created_at timestamp without time zone NOT NULL, + modified_by_client_uuid character varying(255), + modified_by_user_uuid character varying(255), + modified_at timestamp without time zone, + name character varying(255) NOT NULL, + description character varying(524288), + updated_at timestamp without time zone NOT NULL, + group_class character varying(255), + trash_at timestamp without time zone, + is_trashed boolean DEFAULT false NOT NULL, + delete_at timestamp without time zone, + properties jsonb DEFAULT '{}'::jsonb, + frozen_by_uuid character varying +); + + -- -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: - -- @@ -645,30 +690,6 @@ CREATE TABLE public.frozen_groups ( ); --- --- Name: groups; Type: TABLE; Schema: public; Owner: - --- - -CREATE TABLE public.groups ( - id bigint NOT NULL, - uuid character varying(255), - owner_uuid character varying(255), - created_at timestamp without time zone NOT NULL, - modified_by_client_uuid character varying(255), - modified_by_user_uuid character varying(255), - modified_at timestamp without time zone, - name character varying(255) NOT NULL, - description character varying(524288), - updated_at timestamp without time zone NOT NULL, - group_class character varying(255), - trash_at timestamp without time zone, - is_trashed boolean DEFAULT false NOT NULL, - delete_at timestamp without time zone, - properties jsonb DEFAULT '{}'::jsonb, - frozen_by_uuid character varying -); - - -- -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- @@ -3270,6 +3291,8 @@ INSERT INTO "schema_migrations" (version) VALUES ('20221219165512'), ('20221230155924'), ('20230421142716'), -('20230503224107'); +('20230503224107'), +('20230815160000'), +('20230821000000');