multitenantStack/database/seeds/company_template.sql

286 lines
6.1 KiB
SQL

--
-- PostgreSQL database dump
--
-- Dumped from database version 11.0 (Debian 11.0-1.pgdg90+2)
-- Dumped by pg_dump version 11.0 (Homebrew petere/postgresql)
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 client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: company_data; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.company_data (
id integer NOT NULL,
key text NOT NULL,
value text,
data jsonb,
created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
modified timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--
-- Name: companyData_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public."companyData_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: companyData_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public."companyData_id_seq" OWNED BY public.company_data.id;
--
-- Name: company_user; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.company_user (
id integer NOT NULL,
name text NOT NULL,
role smallint NOT NULL,
profile jsonb NOT NULL,
created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
modified timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--
-- Name: companyUser_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public."companyUser_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: companyUser_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public."companyUser_id_seq" OWNED BY public.company_user.id;
--
-- Name: contact; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.contact (
id integer NOT NULL,
"firstName" text,
"lastName" text NOT NULL,
"phoneNumber" text,
email text,
"lastContact" date,
meta jsonb NOT NULL,
created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
modified timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--
-- Name: contact_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.contact_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: contact_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.contact_id_seq OWNED BY public.contact.id;
--
-- Name: post; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.post (
id integer NOT NULL,
name text,
data text NOT NULL,
meta jsonb NOT NULL,
created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
modified timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
);
--
-- Name: post_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.post_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: post_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.post_id_seq OWNED BY public.post.id;
--
-- Name: company_data id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.company_data ALTER COLUMN id SET DEFAULT nextval('public."companyData_id_seq"'::regclass);
--
-- Name: company_user id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.company_user ALTER COLUMN id SET DEFAULT nextval('public."companyUser_id_seq"'::regclass);
--
-- Name: contact id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.contact ALTER COLUMN id SET DEFAULT nextval('public.contact_id_seq'::regclass);
--
-- Name: post id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post ALTER COLUMN id SET DEFAULT nextval('public.post_id_seq'::regclass);
--
-- Data for Name: company_data; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.company_data (id, key, value, data, created, modified) FROM stdin;
\.
--
-- Data for Name: company_user; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.company_user (id, name, role, profile, created, modified) FROM stdin;
\.
--
-- Data for Name: contact; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.contact (id, "firstName", "lastName", "phoneNumber", email, "lastContact", meta, created, modified) FROM stdin;
1 me you \N \N \N {} 2018-11-06 00:00:00+00 2018-11-06 00:00:00+00
\.
--
-- Data for Name: post; Type: TABLE DATA; Schema: public; Owner: -
--
COPY public.post (id, name, data, meta, created, modified) FROM stdin;
\.
--
-- Name: companyData_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('public."companyData_id_seq"', 1, false);
--
-- Name: companyUser_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('public."companyUser_id_seq"', 1, false);
--
-- Name: contact_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('public.contact_id_seq', 1, true);
--
-- Name: post_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--
SELECT pg_catalog.setval('public.post_id_seq', 1, false);
--
-- Name: company_data companyData_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.company_data
ADD CONSTRAINT "companyData_pkey" PRIMARY KEY (id);
--
-- Name: company_user companyUser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.company_user
ADD CONSTRAINT "companyUser_pkey" PRIMARY KEY (id);
--
-- Name: contact contact_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.contact
ADD CONSTRAINT contact_pkey PRIMARY KEY (id);
--
-- Name: post post_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.post
ADD CONSTRAINT post_pkey PRIMARY KEY (id);
--
-- PostgreSQL database dump complete
--