blob: e1394b08562d8f7f33df5e7504a82e29c4164e77 [file] [log] [blame]
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.3 (Debian 13.3-1.pgdg100+1)
-- Dumped by pg_dump version 13.3 (Debian 13.3-1.pgdg100+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: migrations; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.migrations (
version bigint NOT NULL,
dirty boolean NOT NULL
);
ALTER TABLE public.migrations OWNER TO postgres;
--
-- Name: task_logs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.task_logs (
id integer NOT NULL,
workflow_id uuid NOT NULL,
task_name text NOT NULL,
body text NOT NULL,
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.task_logs OWNER TO postgres;
--
-- Name: task_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.task_logs_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.task_logs_id_seq OWNER TO postgres;
--
-- Name: task_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.task_logs_id_seq OWNED BY public.task_logs.id;
--
-- Name: tasks; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.tasks (
workflow_id uuid NOT NULL,
name text NOT NULL,
finished boolean DEFAULT false NOT NULL,
result jsonb,
error text,
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.tasks OWNER TO postgres;
--
-- Name: workflows; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.workflows (
id uuid NOT NULL,
params jsonb,
name text,
created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
ALTER TABLE public.workflows OWNER TO postgres;
--
-- Name: task_logs id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.task_logs ALTER COLUMN id SET DEFAULT nextval('public.task_logs_id_seq'::regclass);
--
-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.migrations
ADD CONSTRAINT migrations_pkey PRIMARY KEY (version);
--
-- Name: task_logs task_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.task_logs
ADD CONSTRAINT task_logs_pkey PRIMARY KEY (id);
--
-- Name: tasks tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tasks
ADD CONSTRAINT tasks_pkey PRIMARY KEY (workflow_id, name);
--
-- Name: workflows workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.workflows
ADD CONSTRAINT workflows_pkey PRIMARY KEY (id);
--
-- Name: task_logs task_logs_workflow_id_task_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.task_logs
ADD CONSTRAINT task_logs_workflow_id_task_name_fkey FOREIGN KEY (workflow_id, task_name) REFERENCES public.tasks(workflow_id, name);
--
-- Name: tasks tasks_workflow_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.tasks
ADD CONSTRAINT tasks_workflow_id_fkey FOREIGN KEY (workflow_id) REFERENCES public.workflows(id);
--
-- PostgreSQL database dump complete
--