\restrict CAC30PXzQJosjH02Spia1vzj9Ui3LB1Cq2HI8r0A4eu33HP8ngxbbM2SzRfTj0c

-- Dumped from database version 17.6
-- Dumped by pg_dump version 17.6

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_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;

--
-- Name: yore; Type: SCHEMA; Schema: -; Owner: -
--

CREATE SCHEMA yore;


SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.schema_migrations (
    version character varying NOT NULL
);


--
-- Name: day_file; Type: TABLE; Schema: yore; Owner: -
--

CREATE TABLE yore.day_file (
    day_file_id bigint NOT NULL,
    day_index_id bigint,
    relative_path text NOT NULL,
    label text DEFAULT 'missing label'::text NOT NULL
);


--
-- Name: day_file_id_seq; Type: SEQUENCE; Schema: yore; Owner: -
--

ALTER TABLE yore.day_file ALTER COLUMN day_file_id ADD GENERATED ALWAYS AS IDENTITY (
    SEQUENCE NAME yore.day_file_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: day_index; Type: TABLE; Schema: yore; Owner: -
--

CREATE TABLE yore.day_index (
    day_index_id bigint NOT NULL,
    day date NOT NULL
);


--
-- Name: day_index_id_seq; Type: SEQUENCE; Schema: yore; Owner: -
--

ALTER TABLE yore.day_index ALTER COLUMN day_index_id ADD GENERATED ALWAYS AS IDENTITY (
    SEQUENCE NAME yore.day_index_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1
);


--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.schema_migrations
    ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- Name: day_file day_file_pkey; Type: CONSTRAINT; Schema: yore; Owner: -
--

ALTER TABLE ONLY yore.day_file
    ADD CONSTRAINT day_file_pkey PRIMARY KEY (day_file_id);


--
-- Name: day_index day_index_day_key; Type: CONSTRAINT; Schema: yore; Owner: -
--

ALTER TABLE ONLY yore.day_index
    ADD CONSTRAINT day_index_day_key UNIQUE (day);


--
-- Name: day_index day_index_pkey; Type: CONSTRAINT; Schema: yore; Owner: -
--

ALTER TABLE ONLY yore.day_index
    ADD CONSTRAINT day_index_pkey PRIMARY KEY (day_index_id);


--
-- Name: day_file day_file_day_id_fkey; Type: FK CONSTRAINT; Schema: yore; Owner: -
--

ALTER TABLE ONLY yore.day_file
    ADD CONSTRAINT day_file_day_id_fkey FOREIGN KEY (day_index_id) REFERENCES yore.day_index(day_index_id);


--
-- PostgreSQL database dump complete
--

\unrestrict CAC30PXzQJosjH02Spia1vzj9Ui3LB1Cq2HI8r0A4eu33HP8ngxbbM2SzRfTj0c


--
-- Dbmate schema migrations
--

INSERT INTO public.schema_migrations (version) VALUES
    ('20250728054639'),
    ('20250728060412'),
    ('20250729075246'),
    ('20250802151406');
