Merge branch '18693-dedup-permissions'
[arvados.git] / services / api / db / structure.sql
index e6bba676257118d542333120a5815549d2cb1f64..002b470b120c81fd100b86d701496826cc074eda 100644 (file)
@@ -254,17 +254,15 @@ $$;
 
 SET default_tablespace = '';
 
-SET default_with_oids = false;
-
 --
 -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -
 --
 
 CREATE TABLE public.api_client_authorizations (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     api_token character varying(255) NOT NULL,
-    api_client_id integer NOT NULL,
-    user_id integer NOT NULL,
+    api_client_id bigint NOT NULL,
+    user_id bigint NOT NULL,
     created_by_ip_address character varying(255),
     last_used_by_ip_address character varying(255),
     last_used_at timestamp without time zone,
@@ -301,7 +299,7 @@ ALTER SEQUENCE public.api_client_authorizations_id_seq OWNED BY public.api_clien
 --
 
 CREATE TABLE public.api_clients (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     modified_by_client_uuid character varying(255),
@@ -351,7 +349,7 @@ CREATE TABLE public.ar_internal_metadata (
 --
 
 CREATE TABLE public.authorized_keys (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -391,7 +389,7 @@ ALTER SEQUENCE public.authorized_keys_id_seq OWNED BY public.authorized_keys.id;
 --
 
 CREATE TABLE public.collections (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -446,7 +444,7 @@ ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
 --
 
 CREATE TABLE public.container_requests (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -480,7 +478,9 @@ CREATE TABLE public.container_requests (
     output_ttl integer DEFAULT 0 NOT NULL,
     secret_mounts jsonb DEFAULT '{}'::jsonb,
     runtime_token text,
-    output_storage_classes jsonb DEFAULT '["default"]'::jsonb
+    output_storage_classes jsonb DEFAULT '["default"]'::jsonb,
+    output_properties jsonb DEFAULT '{}'::jsonb,
+    cumulative_cost double precision DEFAULT 0.0 NOT NULL
 );
 
 
@@ -508,7 +508,7 @@ ALTER SEQUENCE public.container_requests_id_seq OWNED BY public.container_reques
 --
 
 CREATE TABLE public.containers (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -543,7 +543,10 @@ CREATE TABLE public.containers (
     lock_count integer DEFAULT 0 NOT NULL,
     gateway_address character varying,
     interactive_session_started boolean DEFAULT false NOT NULL,
-    output_storage_classes jsonb DEFAULT '["default"]'::jsonb
+    output_storage_classes jsonb DEFAULT '["default"]'::jsonb,
+    output_properties jsonb DEFAULT '{}'::jsonb,
+    cost double precision DEFAULT 0.0 NOT NULL,
+    subrequests_cost double precision DEFAULT 0.0 NOT NULL
 );
 
 
@@ -580,7 +583,7 @@ CREATE TABLE public.frozen_groups (
 --
 
 CREATE TABLE public.groups (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -623,7 +626,7 @@ ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
 --
 
 CREATE TABLE public.humans (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -659,7 +662,7 @@ ALTER SEQUENCE public.humans_id_seq OWNED BY public.humans.id;
 --
 
 CREATE TABLE public.job_tasks (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     modified_by_client_uuid character varying(255),
@@ -723,7 +726,7 @@ ALTER SEQUENCE public.job_tasks_qsequence_seq OWNED BY public.job_tasks.qsequenc
 --
 
 CREATE TABLE public.jobs (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     modified_by_client_uuid character varying(255),
@@ -784,7 +787,7 @@ ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;
 --
 
 CREATE TABLE public.keep_disks (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -830,7 +833,7 @@ ALTER SEQUENCE public.keep_disks_id_seq OWNED BY public.keep_disks.id;
 --
 
 CREATE TABLE public.keep_services (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -870,7 +873,7 @@ ALTER SEQUENCE public.keep_services_id_seq OWNED BY public.keep_services.id;
 --
 
 CREATE TABLE public.links (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -910,7 +913,7 @@ ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
 --
 
 CREATE TABLE public.logs (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     modified_by_client_uuid character varying(255),
@@ -963,7 +966,7 @@ CREATE TABLE public.materialized_permissions (
 --
 
 CREATE TABLE public.nodes (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -1007,7 +1010,7 @@ ALTER SEQUENCE public.nodes_id_seq OWNED BY public.nodes.id;
 --
 
 CREATE TABLE public.users (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255) NOT NULL,
     created_at timestamp without time zone NOT NULL,
@@ -1070,7 +1073,7 @@ UNION ALL
 --
 
 CREATE TABLE public.pipeline_instances (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -1114,7 +1117,7 @@ ALTER SEQUENCE public.pipeline_instances_id_seq OWNED BY public.pipeline_instanc
 --
 
 CREATE TABLE public.pipeline_templates (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -1152,7 +1155,7 @@ ALTER SEQUENCE public.pipeline_templates_id_seq OWNED BY public.pipeline_templat
 --
 
 CREATE TABLE public.repositories (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -1197,7 +1200,7 @@ CREATE TABLE public.schema_migrations (
 --
 
 CREATE TABLE public.specimens (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -1234,7 +1237,7 @@ ALTER SEQUENCE public.specimens_id_seq OWNED BY public.specimens.id;
 --
 
 CREATE TABLE public.traits (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -1300,7 +1303,7 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
 --
 
 CREATE TABLE public.virtual_machines (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
     modified_by_client_uuid character varying(255),
@@ -1336,7 +1339,7 @@ ALTER SEQUENCE public.virtual_machines_id_seq OWNED BY public.virtual_machines.i
 --
 
 CREATE TABLE public.workflows (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -1782,7 +1785,7 @@ CREATE INDEX container_requests_search_index ON public.container_requests USING
 -- Name: container_requests_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX container_requests_trgm_text_search_idx ON public.container_requests USING gin (((((((((((((((((((((((((((((((((((((((((((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)) || ' '::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)) public.gin_trgm_ops);
+CREATE INDEX container_requests_trgm_text_search_idx ON public.container_requests USING gin (((((((((((((((((((((((((((((((((((((((((((((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)) || ' '::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) || ' '::text) || COALESCE((output_properties)::text, ''::text))) public.gin_trgm_ops);
 
 
 --
@@ -3179,6 +3182,11 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20220224203102'),
 ('20220301155729'),
 ('20220303204419'),
-('20220401153101');
+('20220401153101'),
+('20220505112900'),
+('20220726034131'),
+('20220804133317'),
+('20221219165512'),
+('20221230155924');