--
--


SELECT pg_catalog.set_config('search_path', '', false);

--
-- Name: support; Type: TYPE; Schema: public; Owner: kerneltest
--

CREATE TYPE public.support AS ENUM (
    'RAWHIDE',
    'TEST',
    'RELEASE',
    'RETIRED'
);


ALTER TYPE public.support OWNER TO kerneltest;



--
-- Name: alembic_version; Type: TABLE; Schema: public; Owner: kerneltest
--

CREATE TABLE public.alembic_version (
    version_num character varying(32) NOT NULL
);


ALTER TABLE public.alembic_version OWNER TO kerneltest;

--
-- Name: release; Type: TABLE; Schema: public; Owner: kerneltest
--

CREATE TABLE public.release (
    version integer NOT NULL,
    support public.support
);


ALTER TABLE public.release OWNER TO kerneltest;

--
-- Name: release_version_seq; Type: SEQUENCE; Schema: public; Owner: kerneltest
--

CREATE SEQUENCE public.release_version_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.release_version_seq OWNER TO kerneltest;

--
-- Name: release_version_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: kerneltest
--

ALTER SEQUENCE public.release_version_seq OWNED BY public.release.version;


--
-- Name: test; Type: TABLE; Schema: public; Owner: kerneltest
--

CREATE TABLE public.test (
    id integer NOT NULL,
    name text,
    passed boolean,
    waived boolean,
    details text,
    run_id integer
);


ALTER TABLE public.test OWNER TO kerneltest;

--
-- Name: test_id_seq; Type: SEQUENCE; Schema: public; Owner: kerneltest
--

CREATE SEQUENCE public.test_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.test_id_seq OWNER TO kerneltest;

--
-- Name: test_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: kerneltest
--

ALTER SEQUENCE public.test_id_seq OWNED BY public.test.id;


--
-- Name: test_run; Type: TABLE; Schema: public; Owner: kerneltest
--

CREATE TABLE public.test_run (
    id integer NOT NULL,
    created timestamp without time zone NOT NULL,
    kernel_version character varying(128) NOT NULL,
    build_release character varying(256) NOT NULL,
    arch character varying(64) NOT NULL,
    "user" character varying(256),
    fedora_version integer
);


ALTER TABLE public.test_run OWNER TO kerneltest;

--
-- Name: test_run_id_seq; Type: SEQUENCE; Schema: public; Owner: kerneltest
--

CREATE SEQUENCE public.test_run_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.test_run_id_seq OWNER TO kerneltest;

--
-- Name: test_run_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: kerneltest
--

ALTER SEQUENCE public.test_run_id_seq OWNED BY public.test_run.id;


--
-- Name: release version; Type: DEFAULT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.release ALTER COLUMN version SET DEFAULT nextval('public.release_version_seq'::regclass);


--
-- Name: test id; Type: DEFAULT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test ALTER COLUMN id SET DEFAULT nextval('public.test_id_seq'::regclass);


--
-- Name: test_run id; Type: DEFAULT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test_run ALTER COLUMN id SET DEFAULT nextval('public.test_run_id_seq'::regclass);


--
-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: kerneltest
--

COPY public.alembic_version (version_num) FROM stdin;
\.


--
-- Data for Name: release; Type: TABLE DATA; Schema: public; Owner: kerneltest
--

COPY public.release (version, support) FROM stdin;
\.


--
-- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: kerneltest
--

COPY public.test (id, name, passed, waived, details, run_id) FROM stdin;
\.


--
-- Data for Name: test_run; Type: TABLE DATA; Schema: public; Owner: kerneltest
--

COPY public.test_run (id, created, kernel_version, build_release, arch, "user", fedora_version) FROM stdin;
\.


--
-- Name: release_version_seq; Type: SEQUENCE SET; Schema: public; Owner: kerneltest
--

SELECT pg_catalog.setval('public.release_version_seq', 1, false);


--
-- Name: test_id_seq; Type: SEQUENCE SET; Schema: public; Owner: kerneltest
--

SELECT pg_catalog.setval('public.test_id_seq', 1, false);


--
-- Name: test_run_id_seq; Type: SEQUENCE SET; Schema: public; Owner: kerneltest
--

SELECT pg_catalog.setval('public.test_run_id_seq', 1, false);


--
-- Name: alembic_version alembic_version_pkc; Type: CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.alembic_version
    ADD CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num);


--
-- Name: release release_pkey; Type: CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.release
    ADD CONSTRAINT release_pkey PRIMARY KEY (version);


--
-- Name: test test_pkey; Type: CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test
    ADD CONSTRAINT test_pkey PRIMARY KEY (id);


--
-- Name: test_run test_run_pkey; Type: CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test_run
    ADD CONSTRAINT test_run_pkey PRIMARY KEY (id);


--
-- Name: ix_test_name; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_name ON public.test USING btree (name);


--
-- Name: ix_test_passed; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_passed ON public.test USING btree (passed);


--
-- Name: ix_test_run_arch; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_run_arch ON public.test_run USING btree (arch);


--
-- Name: ix_test_run_build_release; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_run_build_release ON public.test_run USING btree (build_release);


--
-- Name: ix_test_run_kernel_version; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_run_kernel_version ON public.test_run USING btree (kernel_version);


--
-- Name: ix_test_waived; Type: INDEX; Schema: public; Owner: kerneltest
--

CREATE INDEX ix_test_waived ON public.test USING btree (waived);


--
-- Name: test_run test_run_fedora_version_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test_run
    ADD CONSTRAINT test_run_fedora_version_fkey FOREIGN KEY (fedora_version) REFERENCES public.release(version);


--
-- Name: test test_run_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kerneltest
--

ALTER TABLE ONLY public.test
    ADD CONSTRAINT test_run_id_fkey FOREIGN KEY (run_id) REFERENCES public.test_run(id);


--
--

