-- PostgreSQL database dump
--
-\restrict pUnZDx0GUxB7H6hGXMrSgK5D3L16cocN5OddcWoL1komxp7bE0cZRegJ3mdzh1j
+\restrict bCYCh5sZAo3Eaa8bUasedCV2H1jNs1GvAasBDDiQVe29BG0iu45omWev4EJu1ZQ
-- Dumped from database version 17.6 (Debian 17.6-0+deb13u1)
-- Dumped by pg_dump version 17.6 (Debian 17.6-0+deb13u1)
SET client_min_messages = warning;
SET row_security = off;
+SET default_tablespace = '';
+
+SET default_table_access_method = heap;
+
+--
+-- Name: lists; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.lists (
+ id integer NOT NULL,
+ name text NOT NULL,
+ slug text NOT NULL,
+ created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ created_by text NOT NULL,
+ deleted_at timestamp with time zone,
+ deleted_by text,
+ license text NOT NULL
+);
+
+
+--
+-- Name: lists_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.lists_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: lists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.lists_id_seq OWNED BY public.lists.id;
+
+
+--
+-- Name: sources; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.sources (
+ id integer NOT NULL,
+ name text NOT NULL,
+ url text NOT NULL,
+ created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ created_by text NOT NULL,
+ deleted_at timestamp with time zone,
+ deleted_by text,
+ license text NOT NULL,
+ list_id integer
+);
+
+
+--
+-- Name: sources_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.sources_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: sources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.sources_id_seq OWNED BY public.sources.id;
+
+
+--
+-- Name: lists id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.lists ALTER COLUMN id SET DEFAULT nextval('public.lists_id_seq'::regclass);
+
+
+--
+-- Name: sources id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.sources ALTER COLUMN id SET DEFAULT nextval('public.sources_id_seq'::regclass);
+
+
+--
+-- Name: lists lists_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.lists
+ ADD CONSTRAINT lists_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: sources sources_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.sources
+ ADD CONSTRAINT sources_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: lists_unique; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE UNIQUE INDEX lists_unique ON public.lists USING btree (slug) WHERE (deleted_at IS NULL);
+
+
+--
+-- Name: sources_unique; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE UNIQUE INDEX sources_unique ON public.sources USING btree (list_id, url) WHERE (deleted_at IS NULL);
+
+
+--
+-- Name: sources sources_list_id; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.sources
+ ADD CONSTRAINT sources_list_id FOREIGN KEY (list_id) REFERENCES public.lists(id);
+
+
--
-- PostgreSQL database dump complete
--
-\unrestrict pUnZDx0GUxB7H6hGXMrSgK5D3L16cocN5OddcWoL1komxp7bE0cZRegJ3mdzh1j
+\unrestrict bCYCh5sZAo3Eaa8bUasedCV2H1jNs1GvAasBDDiQVe29BG0iu45omWev4EJu1ZQ