-
Notifications
You must be signed in to change notification settings - Fork 1
/
dept_userDB.sql
129 lines (94 loc) · 2.84 KB
/
dept_userDB.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.4
-- Dumped by pg_dump version 14.4
-- Started on 2022-07-17 16:14:02
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;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 209 (class 1259 OID 18039)
-- Name: department; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.department (
id bigint NOT NULL,
address character varying(255),
code character varying(255),
name character varying(255)
);
ALTER TABLE public.department OWNER TO postgres;
--
-- TOC entry 210 (class 1259 OID 18046)
-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.hibernate_sequence
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.hibernate_sequence OWNER TO postgres;
--
-- TOC entry 211 (class 1259 OID 18047)
-- Name: user_tbl; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.user_tbl (
id bigint NOT NULL,
department_id bigint,
email character varying(255),
first_name character varying(255),
last_name character varying(255)
);
ALTER TABLE public.user_tbl OWNER TO postgres;
--
-- TOC entry 3311 (class 0 OID 18039)
-- Dependencies: 209
-- Data for Name: department; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.department (id, address, code, name) FROM stdin;
1 25 Parkway Forest Drive IT-006 IT
3 40 Forest Manor Drive HR-008 HR
5 80 Humber Drive FN-020 Finance
\.
--
-- TOC entry 3313 (class 0 OID 18047)
-- Dependencies: 211
-- Data for Name: user_tbl; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.user_tbl (id, department_id, email, first_name, last_name) FROM stdin;
2 1 [email protected] Jatidner Singh
4 3 [email protected] David Miller
6 5 [email protected] Tedd Stuart
\.
--
-- TOC entry 3319 (class 0 OID 0)
-- Dependencies: 210
-- Name: hibernate_sequence; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.hibernate_sequence', 6, true);
--
-- TOC entry 3169 (class 2606 OID 18045)
-- Name: department department_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.department
ADD CONSTRAINT department_pkey PRIMARY KEY (id);
--
-- TOC entry 3171 (class 2606 OID 18053)
-- Name: user_tbl user_tbl_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.user_tbl
ADD CONSTRAINT user_tbl_pkey PRIMARY KEY (id);
-- Completed on 2022-07-17 16:14:03
--
-- PostgreSQL database dump complete
--