From 3bbbbc42fbc7105b10d693fc1bae81823edfd285 Mon Sep 17 00:00:00 2001 From: Brian McCullough Date: Fri, 6 Sep 2024 22:12:13 +0200 Subject: [PATCH] Added DB structure template. --- oidc_db_v2.sql | 151 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 oidc_db_v2.sql diff --git a/oidc_db_v2.sql b/oidc_db_v2.sql new file mode 100644 index 0000000..4a7f654 --- /dev/null +++ b/oidc_db_v2.sql @@ -0,0 +1,151 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 13.11 (Debian 13.11-0+deb11u1) +-- Dumped by pg_dump version 13.11 (Debian 13.11-0+deb11u1) + +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; + +ALTER TABLE ONLY public.owner_email DROP CONSTRAINT owner_email_pkey; +ALTER TABLE ONLY public.clients DROP CONSTRAINT clients_pkey; +ALTER TABLE public.owner_email ALTER COLUMN id DROP DEFAULT; +ALTER TABLE public.clients ALTER COLUMN id DROP DEFAULT; +DROP SEQUENCE public.owner_email_id_seq; +DROP TABLE public.owner_email; +DROP SEQUENCE public.clients_id_seq; +DROP TABLE public.clients; +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: clients; Type: TABLE; Schema: public; Owner: bdmc +-- + +CREATE TABLE public.clients ( + id integer NOT NULL, + site_name character varying(100), + site_owner character varying(100), + client_id character varying(100), + owner_id character varying(2047), + redirect_url character varying(1023), + token_endpoint_auth_method character varying(100), + created_at timestamp without time zone DEFAULT now(), + updated_at timestamp without time zone DEFAULT now(), + deleted_at timestamp without time zone +); + + +ALTER TABLE public.clients OWNER TO bdmc; + +-- +-- Name: clients_id_seq; Type: SEQUENCE; Schema: public; Owner: bdmc +-- + +CREATE SEQUENCE public.clients_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.clients_id_seq OWNER TO bdmc; + +-- +-- Name: clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bdmc +-- + +ALTER SEQUENCE public.clients_id_seq OWNED BY public.clients.id; + + +-- +-- Name: owner_email; Type: TABLE; Schema: public; Owner: bdmc +-- + +CREATE TABLE public.owner_email ( + id integer NOT NULL, + client_id integer, + e_mail character varying(100), + created_at timestamp without time zone DEFAULT now(), + updated_at timestamp without time zone DEFAULT now(), + deleted_at timestamp without time zone +); + + +ALTER TABLE public.owner_email OWNER TO bdmc; + +-- +-- Name: owner_email_id_seq; Type: SEQUENCE; Schema: public; Owner: bdmc +-- + +CREATE SEQUENCE public.owner_email_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public.owner_email_id_seq OWNER TO bdmc; + +-- +-- Name: owner_email_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bdmc +-- + +ALTER SEQUENCE public.owner_email_id_seq OWNED BY public.owner_email.id; + + +-- +-- Name: clients id; Type: DEFAULT; Schema: public; Owner: bdmc +-- + +ALTER TABLE ONLY public.clients ALTER COLUMN id SET DEFAULT nextval('public.clients_id_seq'::regclass); + + +-- +-- Name: owner_email id; Type: DEFAULT; Schema: public; Owner: bdmc +-- + +ALTER TABLE ONLY public.owner_email ALTER COLUMN id SET DEFAULT nextval('public.owner_email_id_seq'::regclass); + + +-- +-- Name: clients clients_pkey; Type: CONSTRAINT; Schema: public; Owner: bdmc +-- + +ALTER TABLE ONLY public.clients + ADD CONSTRAINT clients_pkey PRIMARY KEY (id); + + +-- +-- Name: owner_email owner_email_pkey; Type: CONSTRAINT; Schema: public; Owner: bdmc +-- + +ALTER TABLE ONLY public.owner_email + ADD CONSTRAINT owner_email_pkey PRIMARY KEY (id); + + +-- +-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres +-- + +GRANT ALL ON SCHEMA public TO bdmc; + + +-- +-- PostgreSQL database dump complete +-- +