Skip to content

Instantly share code, notes, and snippets.

@MansurAshraf
Created June 23, 2020 07:16
Show Gist options
  • Save MansurAshraf/dff404573d5e7ac997bdf35650742e3b to your computer and use it in GitHub Desktop.
Save MansurAshraf/dff404573d5e7ac997bdf35650742e3b to your computer and use it in GitHub Desktop.
--
-- NOTE:
--
-- File paths need to be edited. Search for $$PATH$$ and
-- replace it with the path to the directory containing
-- the extracted data files.
--
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.8
-- Dumped by pg_dump version 12.3
set experimental_serial_normalization = sql_sequence;
--
-- Name: agent_connections; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE agent_connections (
id bigint NOT NULL,
created timestamp(3) without time zone DEFAULT now() NOT NULL,
updated timestamp(3) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
job_id character varying(255) NOT NULL,
server_hostname character varying(255) NOT NULL
);
--
-- Name: agent_connections_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE agent_connections_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: agent_connections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: applications; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE applications (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
unique_id character varying(255) NOT NULL,
name character varying(255) NOT NULL,
genie_user character varying(255) NOT NULL,
version character varying(255) NOT NULL,
description character varying(1000) DEFAULT NULL::character varying,
metadata text,
setup_file bigint,
status character varying(20) DEFAULT 'INACTIVE'::character varying NOT NULL,
type character varying(255) DEFAULT NULL::character varying,
requested_id boolean DEFAULT false NOT NULL
);
--
-- Name: applications_configs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE applications_configs (
application_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: applications_dependencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE applications_dependencies (
application_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: applications_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE applications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: applications_tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE applications_tags (
application_id bigint NOT NULL,
tag_id bigint NOT NULL
);
--
-- Name: clusters; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE clusters (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
unique_id character varying(255) NOT NULL,
name character varying(255) NOT NULL,
genie_user character varying(255) NOT NULL,
version character varying(255) NOT NULL,
description character varying(1000) DEFAULT NULL::character varying,
metadata text,
setup_file bigint,
status character varying(20) DEFAULT 'OUT_OF_SERVICE'::character varying NOT NULL,
requested_id boolean DEFAULT false NOT NULL
);
--
-- Name: clusters_configs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE clusters_configs (
cluster_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: clusters_dependencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE clusters_dependencies (
cluster_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: clusters_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE clusters_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: clusters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: clusters_tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE clusters_tags (
cluster_id bigint NOT NULL,
tag_id bigint NOT NULL
);
--
-- Name: command_executable_arguments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE command_executable_arguments (
command_id bigint NOT NULL,
argument character varying(1024) NOT NULL,
argument_order int4 NOT NULL
);
--
-- Name: commands; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
unique_id character varying(255) NOT NULL,
name character varying(255) NOT NULL,
genie_user character varying(255) NOT NULL,
version character varying(255) NOT NULL,
description character varying(1000) DEFAULT NULL::character varying,
metadata text,
setup_file bigint,
check_delay bigint DEFAULT '10000'::bigint NOT NULL,
memory int4,
status character varying(20) DEFAULT 'INACTIVE'::character varying NOT NULL,
requested_id boolean DEFAULT false NOT NULL
);
--
-- Name: commands_applications; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands_applications (
command_id bigint NOT NULL,
application_id bigint NOT NULL,
application_order int4 NOT NULL
);
--
-- Name: commands_cluster_criteria; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands_cluster_criteria (
command_id bigint NOT NULL,
criterion_id bigint NOT NULL,
priority_order int4 NOT NULL
);
--
-- Name: commands_configs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands_configs (
command_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: commands_dependencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands_dependencies (
command_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: commands_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE commands_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: commands_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: commands_tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE commands_tags (
command_id bigint NOT NULL,
tag_id bigint NOT NULL
);
--
-- Name: criteria; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE criteria (
id bigint NOT NULL,
unique_id character varying(255) DEFAULT NULL::character varying,
name character varying(255) DEFAULT NULL::character varying,
version character varying(255) DEFAULT NULL::character varying,
status character varying(255) DEFAULT NULL::character varying
);
--
-- Name: criteria_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE criteria_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: criteria_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: criteria_tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE criteria_tags (
criterion_id bigint NOT NULL,
tag_id bigint NOT NULL
);
--
-- Name: files; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE files (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
file character varying(1024) NOT NULL
);
--
-- Name: files_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE files_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: flyway_schema_history; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE flyway_schema_history (
installed_rank int4 NOT NULL,
version character varying(50),
description character varying(200) NOT NULL,
type character varying(20) NOT NULL,
script character varying(1000) NOT NULL,
checksum int4,
installed_by character varying(100) NOT NULL,
installed_on timestamp without time zone DEFAULT now() NOT NULL,
execution_time int4 NOT NULL,
success boolean NOT NULL
);
--
-- Name: job_command_arguments; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE job_command_arguments (
job_id bigint NOT NULL,
argument character varying(10000) NOT NULL,
argument_order int4 NOT NULL
);
--
-- Name: job_environment_variables; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE job_environment_variables (
job_id bigint NOT NULL,
name character varying(255) NOT NULL,
value character varying(1024) NOT NULL
);
--
-- Name: job_requested_applications; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE job_requested_applications (
job_id bigint NOT NULL,
application_id character varying(255) NOT NULL,
application_order int4 NOT NULL
);
--
-- Name: job_requested_environment_variables; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE job_requested_environment_variables (
job_id bigint NOT NULL,
name character varying(255) NOT NULL,
value character varying(1024) NOT NULL
);
--
-- Name: jobs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
unique_id character varying(255) NOT NULL,
name character varying(255) NOT NULL,
genie_user character varying(255) NOT NULL,
version character varying(255) NOT NULL,
command_criterion bigint,
description character varying(1000) DEFAULT NULL::character varying,
metadata text,
setup_file bigint,
tags character varying(1024) DEFAULT NULL::character varying,
genie_user_group character varying(255) DEFAULT NULL::character varying,
archiving_disabled boolean DEFAULT false NOT NULL,
email character varying(255) DEFAULT NULL::character varying,
requested_cpu int4,
requested_memory int4,
requested_timeout int4,
"grouping" character varying(255) DEFAULT NULL::character varying,
grouping_instance character varying(255) DEFAULT NULL::character varying,
request_api_client_hostname character varying(255) DEFAULT NULL::character varying,
request_api_client_user_agent character varying(1024) DEFAULT NULL::character varying,
num_attachments int4,
total_size_of_attachments bigint,
std_out_size bigint,
std_err_size bigint,
command_id bigint,
command_name character varying(255) DEFAULT NULL::character varying,
cluster_id bigint,
cluster_name character varying(255) DEFAULT NULL::character varying,
started timestamp(6) without time zone DEFAULT NULL::timestamp without time zone,
finished timestamp(6) without time zone DEFAULT NULL::timestamp without time zone,
status character varying(20) DEFAULT 'RESERVED'::character varying NOT NULL,
status_msg character varying(255) DEFAULT NULL::character varying,
agent_hostname character varying(255) DEFAULT NULL::character varying,
process_id int4,
exit_code int4,
check_delay bigint,
timeout timestamp(6) without time zone DEFAULT NULL::timestamp without time zone,
memory_used int4,
archive_location character varying(1024) DEFAULT NULL::character varying,
interactive boolean DEFAULT false NOT NULL,
requested_job_directory_location character varying(1024) DEFAULT NULL::character varying,
requested_agent_config_ext text,
requested_agent_environment_ext text,
request_agent_client_hostname character varying(255) DEFAULT NULL::character varying,
request_agent_client_version character varying(255) DEFAULT NULL::character varying,
request_agent_client_pid int4,
requested_id boolean DEFAULT false NOT NULL,
job_directory_location character varying(1024) DEFAULT NULL::character varying,
resolved boolean DEFAULT false NOT NULL,
agent_version character varying(255) DEFAULT NULL::character varying,
agent_pid int4,
claimed boolean DEFAULT false NOT NULL,
v4 boolean DEFAULT false NOT NULL,
timeout_used int4,
api boolean DEFAULT true NOT NULL,
archive_status character varying(20) DEFAULT NULL::character varying,
launcher_ext text
);
--
-- Name: jobs_applications; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs_applications (
job_id bigint NOT NULL,
application_id bigint NOT NULL,
application_order int4 NOT NULL
);
--
-- Name: jobs_cluster_criteria; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs_cluster_criteria (
job_id bigint NOT NULL,
criterion_id bigint NOT NULL,
priority_order int4 NOT NULL
);
--
-- Name: jobs_configs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs_configs (
job_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: jobs_dependencies; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs_dependencies (
job_id bigint NOT NULL,
file_id bigint NOT NULL
);
--
-- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE jobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: jobs_tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE jobs_tags (
job_id bigint NOT NULL,
tag_id bigint NOT NULL
);
--
-- Name: tags; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE tags (
id bigint NOT NULL,
created timestamp(6) without time zone DEFAULT now() NOT NULL,
updated timestamp(6) without time zone DEFAULT now() NOT NULL,
entity_version int4 DEFAULT 0 NOT NULL,
tag character varying(255) NOT NULL
);
--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE tags_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
--
-- Name: agent_connections id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agent_connections ALTER COLUMN id SET DEFAULT nextval('agent_connections_id_seq'::STRING);
--
-- Name: applications id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications ALTER COLUMN id SET DEFAULT nextval('applications_id_seq'::STRING);
--
-- Name: clusters id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq'::STRING);
--
-- Name: commands id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands ALTER COLUMN id SET DEFAULT nextval('commands_id_seq'::STRING);
--
-- Name: criteria id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY criteria ALTER COLUMN id SET DEFAULT nextval('criteria_id_seq'::STRING);
--
-- Name: files id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY files ALTER COLUMN id SET DEFAULT nextval('files_id_seq'::STRING);
--
-- Name: jobs id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::STRING);
--
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::STRING);
--
-- Name: agent_connections agent_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agent_connections
ADD CONSTRAINT agent_connections_pkey PRIMARY KEY (id);
--
-- Name: applications_configs applications_configs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_configs
ADD CONSTRAINT applications_configs_pkey PRIMARY KEY (application_id, file_id);
--
-- Name: applications_dependencies applications_dependencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_dependencies
ADD CONSTRAINT applications_dependencies_pkey PRIMARY KEY (application_id, file_id);
--
-- Name: applications applications_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications
ADD CONSTRAINT applications_pkey PRIMARY KEY (id);
--
-- Name: applications_tags applications_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT applications_tags_pkey PRIMARY KEY (application_id, tag_id);
--
-- Name: clusters_configs clusters_configs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_configs
ADD CONSTRAINT clusters_configs_pkey PRIMARY KEY (cluster_id, file_id);
--
-- Name: clusters_dependencies clusters_dependencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_dependencies
ADD CONSTRAINT clusters_dependencies_pkey PRIMARY KEY (cluster_id, file_id);
--
-- Name: clusters clusters_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters
ADD CONSTRAINT clusters_pkey PRIMARY KEY (id);
--
-- Name: clusters_tags clusters_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_tags
ADD CONSTRAINT clusters_tags_pkey PRIMARY KEY (cluster_id, tag_id);
--
-- Name: command_executable_arguments command_executable_arguments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY command_executable_arguments
ADD CONSTRAINT command_executable_arguments_pkey PRIMARY KEY (command_id, argument_order);
--
-- Name: commands_applications commands_applications_pkey1; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_applications
ADD CONSTRAINT commands_applications_pkey1 PRIMARY KEY (command_id, application_id, application_order);
--
-- Name: commands_cluster_criteria commands_cluster_criteria_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_cluster_criteria
ADD CONSTRAINT commands_cluster_criteria_pkey PRIMARY KEY (command_id, criterion_id, priority_order);
--
-- Name: commands_configs commands_configs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_configs
ADD CONSTRAINT commands_configs_pkey PRIMARY KEY (command_id, file_id);
--
-- Name: commands_dependencies commands_dependencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_dependencies
ADD CONSTRAINT commands_dependencies_pkey PRIMARY KEY (command_id, file_id);
--
-- Name: commands commands_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands
ADD CONSTRAINT commands_pkey PRIMARY KEY (id);
--
-- Name: commands_tags commands_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_tags
ADD CONSTRAINT commands_tags_pkey PRIMARY KEY (command_id, tag_id);
--
-- Name: criteria criteria_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY criteria
ADD CONSTRAINT criteria_pkey PRIMARY KEY (id);
--
-- Name: criteria_tags criteria_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY criteria_tags
ADD CONSTRAINT criteria_tags_pkey PRIMARY KEY (criterion_id, tag_id);
--
-- Name: files files_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY files
ADD CONSTRAINT files_pkey PRIMARY KEY (id);
--
-- Name: flyway_schema_history flyway_schema_history_pk; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY flyway_schema_history
ADD CONSTRAINT flyway_schema_history_pk PRIMARY KEY (installed_rank);
--
-- Name: job_requested_applications job_applications_requested_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_requested_applications
ADD CONSTRAINT job_applications_requested_pkey PRIMARY KEY (job_id, application_id, application_order);
--
-- Name: job_command_arguments job_command_arguments_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_command_arguments
ADD CONSTRAINT job_command_arguments_pkey PRIMARY KEY (job_id, argument_order);
--
-- Name: job_environment_variables job_environment_variables_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_environment_variables
ADD CONSTRAINT job_environment_variables_pkey PRIMARY KEY (job_id, name);
--
-- Name: job_requested_environment_variables job_requested_environment_variables_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_requested_environment_variables
ADD CONSTRAINT job_requested_environment_variables_pkey PRIMARY KEY (job_id, name);
--
-- Name: jobs_applications jobs_applications_pkey1; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_applications
ADD CONSTRAINT jobs_applications_pkey1 PRIMARY KEY (job_id, application_id, application_order);
--
-- Name: jobs_cluster_criteria jobs_cluster_criteria_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_cluster_criteria
ADD CONSTRAINT jobs_cluster_criteria_pkey PRIMARY KEY (job_id, criterion_id, priority_order);
--
-- Name: jobs_configs jobs_configs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_configs
ADD CONSTRAINT jobs_configs_pkey PRIMARY KEY (job_id, file_id);
--
-- Name: jobs_dependencies jobs_dependencies_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_dependencies
ADD CONSTRAINT jobs_dependencies_pkey PRIMARY KEY (job_id, file_id);
--
-- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs
ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
--
-- Name: jobs_tags jobs_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_tags
ADD CONSTRAINT jobs_tags_pkey PRIMARY KEY (job_id, tag_id);
--
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY tags
ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
--
-- Name: agent_connections_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX agent_connections_job_id_index ON agent_connections USING btree (job_id);
--
-- Name: agent_connections_server_hostname_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX agent_connections_server_hostname_index ON agent_connections USING btree (server_hostname);
--
-- Name: applications_configs_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_configs_application_id_index ON applications_configs USING btree (application_id);
--
-- Name: applications_configs_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_configs_file_id_index ON applications_configs USING btree (file_id);
--
-- Name: applications_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_created_index ON applications USING btree (created);
--
-- Name: applications_dependencies_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_dependencies_application_id_index ON applications_dependencies USING btree (application_id);
--
-- Name: applications_dependencies_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_dependencies_file_id_index ON applications_dependencies USING btree (file_id);
--
-- Name: applications_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_name_index ON applications USING btree (name);
--
-- Name: applications_setup_file_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_setup_file_index ON applications USING btree (setup_file);
--
-- Name: applications_status_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_status_index ON applications USING btree (status);
--
-- Name: applications_tags_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_tags_application_id_index ON applications_tags USING btree (application_id);
--
-- Name: applications_tags_tags_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_tags_tags_id_index ON applications_tags USING btree (tag_id);
--
-- Name: applications_type_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_type_index ON applications USING btree (type);
--
-- Name: applications_unique_id_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX applications_unique_id_unique_index ON applications USING btree (unique_id);
--
-- Name: applications_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_updated_index ON applications USING btree (updated);
--
-- Name: applications_version_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX applications_version_index ON applications USING btree (version);
--
-- Name: clusters_configs_cluster_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_configs_cluster_id_index ON clusters_configs USING btree (cluster_id);
--
-- Name: clusters_configs_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_configs_file_id_index ON clusters_configs USING btree (file_id);
--
-- Name: clusters_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_created_index ON clusters USING btree (created);
--
-- Name: clusters_dependencies_cluster_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_dependencies_cluster_id_index ON clusters_dependencies USING btree (cluster_id);
--
-- Name: clusters_dependencies_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_dependencies_file_id_index ON clusters_dependencies USING btree (file_id);
--
-- Name: clusters_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_name_index ON clusters USING btree (name);
--
-- Name: clusters_setup_file_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_setup_file_index ON clusters USING btree (name);
--
-- Name: clusters_status_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_status_index ON clusters USING btree (status);
--
-- Name: clusters_tags_cluster_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_tags_cluster_id_index ON clusters_tags USING btree (cluster_id);
--
-- Name: clusters_tags_tags_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_tags_tags_id_index ON clusters_tags USING btree (tag_id);
--
-- Name: clusters_unique_id_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX clusters_unique_id_unique_index ON clusters USING btree (unique_id);
--
-- Name: clusters_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_updated_index ON clusters USING btree (updated);
--
-- Name: clusters_version_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX clusters_version_index ON clusters USING btree (version);
--
-- Name: command_executable_arguments_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX command_executable_arguments_command_id_index ON command_executable_arguments USING btree (command_id);
--
-- Name: commands_applications_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_applications_application_id_index ON commands_applications USING btree (application_id);
--
-- Name: commands_applications_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_applications_command_id_index ON commands_applications USING btree (command_id);
--
-- Name: commands_cluster_criteria_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_cluster_criteria_command_id_index ON commands_cluster_criteria USING btree (command_id);
--
-- Name: commands_cluster_criteria_criterion_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_cluster_criteria_criterion_id_index ON commands_cluster_criteria USING btree (criterion_id);
--
-- Name: commands_configs_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_configs_command_id_index ON commands_configs USING btree (command_id);
--
-- Name: commands_configs_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_configs_file_id_index ON commands_configs USING btree (file_id);
--
-- Name: commands_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_created_index ON commands USING btree (created);
--
-- Name: commands_dependencies_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_dependencies_command_id_index ON commands_dependencies USING btree (command_id);
--
-- Name: commands_dependencies_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_dependencies_file_id_index ON commands_dependencies USING btree (file_id);
--
-- Name: commands_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_name_index ON commands USING btree (name);
--
-- Name: commands_setup_file_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_setup_file_index ON commands USING btree (setup_file);
--
-- Name: commands_status_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_status_index ON commands USING btree (status);
--
-- Name: commands_tags_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_tags_command_id_index ON commands_tags USING btree (command_id);
--
-- Name: commands_tags_tags_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_tags_tags_id_index ON commands_tags USING btree (tag_id);
--
-- Name: commands_unique_id_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX commands_unique_id_unique_index ON commands USING btree (unique_id);
--
-- Name: commands_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_updated_index ON commands USING btree (updated);
--
-- Name: commands_version_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX commands_version_index ON commands USING btree (version);
--
-- Name: criteria_tags_criterion_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX criteria_tags_criterion_id_index ON criteria_tags USING btree (criterion_id);
--
-- Name: criteria_tags_tag_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX criteria_tags_tag_id_index ON criteria_tags USING btree (tag_id);
--
-- Name: files_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX files_created_index ON files USING btree (created);
--
-- Name: files_file_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX files_file_unique_index ON files USING btree (file);
--
-- Name: files_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX files_updated_index ON files USING btree (updated);
--
-- Name: flyway_schema_history_s_idx; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX flyway_schema_history_s_idx ON flyway_schema_history USING btree (success);
--
-- Name: job_command_arguments_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX job_command_arguments_job_id_index ON job_command_arguments USING btree (job_id);
--
-- Name: job_environment_variables_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX job_environment_variables_job_id_index ON job_environment_variables USING btree (job_id);
--
-- Name: job_requested_applications_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX job_requested_applications_application_id_index ON job_requested_applications USING btree (application_id);
--
-- Name: job_requested_applications_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX job_requested_applications_job_id_index ON job_requested_applications USING btree (job_id);
--
-- Name: job_requested_environment_variables_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX job_requested_environment_variables_job_id_index ON job_requested_environment_variables USING btree (job_id);
--
-- Name: jobs_agent_hostname_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_agent_hostname_index ON jobs USING btree (agent_hostname);
--
-- Name: jobs_api_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_api_index ON jobs USING btree (api);
--
-- Name: jobs_applications_application_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_applications_application_id_index ON jobs_applications USING btree (application_id);
--
-- Name: jobs_applications_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_applications_job_id_index ON jobs_applications USING btree (job_id);
--
-- Name: jobs_cluster_criteria_criterion_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_cluster_criteria_criterion_id_index ON jobs_cluster_criteria USING btree (criterion_id);
--
-- Name: jobs_cluster_criteria_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_cluster_criteria_job_id_index ON jobs_cluster_criteria USING btree (job_id);
--
-- Name: jobs_cluster_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_cluster_id_index ON jobs USING btree (cluster_id);
--
-- Name: jobs_cluster_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_cluster_name_index ON jobs USING btree (cluster_name);
--
-- Name: jobs_command_criterion_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_command_criterion_index ON jobs USING btree (command_criterion);
--
-- Name: jobs_command_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_command_id_index ON jobs USING btree (command_id);
--
-- Name: jobs_command_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_command_name_index ON jobs USING btree (command_name);
--
-- Name: jobs_configs_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_configs_file_id_index ON jobs_configs USING btree (file_id);
--
-- Name: jobs_configs_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_configs_job_id_index ON jobs_configs USING btree (job_id);
--
-- Name: jobs_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_created_index ON jobs USING btree (created);
--
-- Name: jobs_dependencies_file_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_dependencies_file_id_index ON jobs_dependencies USING btree (file_id);
--
-- Name: jobs_dependencies_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_dependencies_job_id_index ON jobs_dependencies USING btree (job_id);
--
-- Name: jobs_finished_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_finished_index ON jobs USING btree (finished);
--
-- Name: jobs_grouping_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_grouping_index ON jobs USING btree ("grouping");
--
-- Name: jobs_grouping_instance_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_grouping_instance_index ON jobs USING btree (grouping_instance);
--
-- Name: jobs_name_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_name_index ON jobs USING btree (name);
--
-- Name: jobs_setup_file_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_setup_file_index ON jobs USING btree (setup_file);
--
-- Name: jobs_started_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_started_index ON jobs USING btree (started);
--
-- Name: jobs_status_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_status_index ON jobs USING btree (status);
--
-- Name: jobs_tags_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_tags_index ON jobs USING btree (tags);
--
-- Name: jobs_tags_job_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_tags_job_id_index ON jobs_tags USING btree (job_id);
--
-- Name: jobs_tags_tags_id_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_tags_tags_id_index ON jobs_tags USING btree (tag_id);
--
-- Name: jobs_unique_id_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX jobs_unique_id_unique_index ON jobs USING btree (unique_id);
--
-- Name: jobs_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_updated_index ON jobs USING btree (updated);
--
-- Name: jobs_user_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_user_index ON jobs USING btree (genie_user);
--
-- Name: jobs_v4_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_v4_index ON jobs USING btree (v4);
--
-- Name: jobs_version_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX jobs_version_index ON jobs USING btree (version);
--
-- Name: tags_created_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX tags_created_index ON tags USING btree (created);
--
-- Name: tags_tag_unique_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX tags_tag_unique_index ON tags USING btree (tag);
--
-- Name: tags_updated_index; Type: INDEX; Schema: public; Owner: postgres
--
CREATE INDEX tags_updated_index ON tags USING btree (updated);
--
-- Name: applications_configs applications_configs_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_configs
ADD CONSTRAINT applications_configs_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON DELETE CASCADE;
--
-- Name: applications_configs applications_configs_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_configs
ADD CONSTRAINT applications_configs_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: applications_dependencies applications_dependencies_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_dependencies
ADD CONSTRAINT applications_dependencies_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON DELETE CASCADE;
--
-- Name: applications_dependencies applications_dependencies_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_dependencies
ADD CONSTRAINT applications_dependencies_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: applications applications_setup_file_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications
ADD CONSTRAINT applications_setup_file_fkey FOREIGN KEY (setup_file) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: applications_tags applications_tags_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT applications_tags_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON DELETE CASCADE;
--
-- Name: applications_tags applications_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY applications_tags
ADD CONSTRAINT applications_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE RESTRICT;
--
-- Name: clusters_configs clusters_configs_cluster_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_configs
ADD CONSTRAINT clusters_configs_cluster_id_fkey FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
--
-- Name: clusters_configs clusters_configs_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_configs
ADD CONSTRAINT clusters_configs_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: clusters_dependencies clusters_dependencies_cluster_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_dependencies
ADD CONSTRAINT clusters_dependencies_cluster_id_fkey FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
--
-- Name: clusters_dependencies clusters_dependencies_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_dependencies
ADD CONSTRAINT clusters_dependencies_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: clusters clusters_setup_file_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters
ADD CONSTRAINT clusters_setup_file_fkey FOREIGN KEY (setup_file) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: clusters_tags clusters_tags_cluster_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_tags
ADD CONSTRAINT clusters_tags_cluster_id_fkey FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
--
-- Name: clusters_tags clusters_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY clusters_tags
ADD CONSTRAINT clusters_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE RESTRICT;
--
-- Name: command_executable_arguments command_executable_arguments_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY command_executable_arguments
ADD CONSTRAINT command_executable_arguments_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_applications commands_applications_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_applications
ADD CONSTRAINT commands_applications_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON DELETE RESTRICT;
--
-- Name: commands_applications commands_applications_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_applications
ADD CONSTRAINT commands_applications_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_cluster_criteria commands_cluster_criteria_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_cluster_criteria
ADD CONSTRAINT commands_cluster_criteria_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_cluster_criteria commands_cluster_criteria_criterion_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_cluster_criteria
ADD CONSTRAINT commands_cluster_criteria_criterion_id_fkey FOREIGN KEY (criterion_id) REFERENCES criteria(id) ON DELETE RESTRICT;
--
-- Name: commands_configs commands_configs_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_configs
ADD CONSTRAINT commands_configs_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_configs commands_configs_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_configs
ADD CONSTRAINT commands_configs_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: commands_dependencies commands_dependencies_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_dependencies
ADD CONSTRAINT commands_dependencies_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_dependencies commands_dependencies_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_dependencies
ADD CONSTRAINT commands_dependencies_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: commands commands_setup_file_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands
ADD CONSTRAINT commands_setup_file_fkey FOREIGN KEY (setup_file) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: commands_tags commands_tags_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_tags
ADD CONSTRAINT commands_tags_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE CASCADE;
--
-- Name: commands_tags commands_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY commands_tags
ADD CONSTRAINT commands_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE RESTRICT;
--
-- Name: criteria_tags criteria_tags_criterion_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY criteria_tags
ADD CONSTRAINT criteria_tags_criterion_id_fkey FOREIGN KEY (criterion_id) REFERENCES criteria(id) ON DELETE CASCADE;
--
-- Name: criteria_tags criteria_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY criteria_tags
ADD CONSTRAINT criteria_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE RESTRICT;
--
-- Name: job_command_arguments job_command_arguments_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_command_arguments
ADD CONSTRAINT job_command_arguments_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: job_environment_variables job_environment_variables_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_environment_variables
ADD CONSTRAINT job_environment_variables_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: job_requested_applications job_requested_applications_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_requested_applications
ADD CONSTRAINT job_requested_applications_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: job_requested_environment_variables job_requested_environment_variables_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY job_requested_environment_variables
ADD CONSTRAINT job_requested_environment_variables_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs_applications jobs_applications_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_applications
ADD CONSTRAINT jobs_applications_application_id_fkey FOREIGN KEY (application_id) REFERENCES applications(id) ON DELETE RESTRICT;
--
-- Name: jobs_applications jobs_applications_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_applications
ADD CONSTRAINT jobs_applications_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs_cluster_criteria jobs_cluster_criteria_criterion_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_cluster_criteria
ADD CONSTRAINT jobs_cluster_criteria_criterion_id_fkey FOREIGN KEY (criterion_id) REFERENCES criteria(id) ON DELETE RESTRICT;
--
-- Name: jobs_cluster_criteria jobs_cluster_criteria_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_cluster_criteria
ADD CONSTRAINT jobs_cluster_criteria_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs jobs_cluster_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs
ADD CONSTRAINT jobs_cluster_id_fkey FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE RESTRICT;
--
-- Name: jobs jobs_command_criterion_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs
ADD CONSTRAINT jobs_command_criterion_fkey FOREIGN KEY (command_criterion) REFERENCES criteria(id) ON DELETE RESTRICT;
--
-- Name: jobs jobs_command_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs
ADD CONSTRAINT jobs_command_id_fkey FOREIGN KEY (command_id) REFERENCES commands(id) ON DELETE RESTRICT;
--
-- Name: jobs_configs jobs_configs_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_configs
ADD CONSTRAINT jobs_configs_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: jobs_configs jobs_configs_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_configs
ADD CONSTRAINT jobs_configs_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs_dependencies jobs_dependencies_file_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_dependencies
ADD CONSTRAINT jobs_dependencies_file_id_fkey FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: jobs_dependencies jobs_dependencies_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_dependencies
ADD CONSTRAINT jobs_dependencies_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs jobs_setup_file_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs
ADD CONSTRAINT jobs_setup_file_fkey FOREIGN KEY (setup_file) REFERENCES files(id) ON DELETE RESTRICT;
--
-- Name: jobs_tags jobs_tags_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_tags
ADD CONSTRAINT jobs_tags_job_id_fkey FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE;
--
-- Name: jobs_tags jobs_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY jobs_tags
ADD CONSTRAINT jobs_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE RESTRICT;
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment