-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbackup_remastered.sql
More file actions
345 lines (244 loc) · 8.54 KB
/
Copy pathbackup_remastered.sql
File metadata and controls
345 lines (244 loc) · 8.54 KB
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.2
-- Dumped by pg_dump version 13.2
-- Started on 2021-05-10 00:23:01
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;
DROP DATABASE "HRMS";
--
-- TOC entry 3036 (class 1262 OID 17377)
-- Name: HRMS; Type: DATABASE; Schema: -; Owner: postgres
--
CREATE DATABASE "HRMS" WITH TEMPLATE = template0 ENCODING = 'UTF8' LOCALE = 'Turkish_Turkey.1254';
ALTER DATABASE "HRMS" OWNER TO postgres;
\connect "HRMS"
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 200 (class 1259 OID 17378)
-- Name: employees; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.employees (
"UserId" integer NOT NULL,
"FirstName" character varying(50) NOT NULL,
"LastName" character varying(50) NOT NULL,
"NationalityId" character(11) NOT NULL,
"BirthOfDate" date NOT NULL
);
ALTER TABLE public.employees OWNER TO postgres;
--
-- TOC entry 201 (class 1259 OID 17381)
-- Name: employers; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.employers (
"UserId" integer NOT NULL,
"CompanyName" character varying(100) NOT NULL,
"Phone" character(12) NOT NULL,
"VerifiedBySystem" boolean NOT NULL,
"Website" character varying(100) NOT NULL
);
ALTER TABLE public.employers OWNER TO postgres;
--
-- TOC entry 207 (class 1259 OID 17442)
-- 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 202 (class 1259 OID 17384)
-- Name: jobpositions; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.jobpositions (
"Id" integer NOT NULL,
"PositionName" character varying NOT NULL
);
ALTER TABLE public.jobpositions OWNER TO postgres;
--
-- TOC entry 203 (class 1259 OID 17390)
-- Name: jobpositions_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
ALTER TABLE public.jobpositions ALTER COLUMN "Id" ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public."jobpositions_Id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- TOC entry 204 (class 1259 OID 17392)
-- Name: systemusers; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.systemusers (
"UserId" integer NOT NULL,
"Roles" character varying NOT NULL
);
ALTER TABLE public.systemusers OWNER TO postgres;
--
-- TOC entry 205 (class 1259 OID 17398)
-- Name: users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.users (
"Id" integer NOT NULL,
"Email" character varying(100) NOT NULL,
"Password" character varying NOT NULL,
"EmailVerified" boolean DEFAULT false NOT NULL
);
ALTER TABLE public.users OWNER TO postgres;
--
-- TOC entry 206 (class 1259 OID 17405)
-- Name: users_Id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
ALTER TABLE public.users ALTER COLUMN "Id" ADD GENERATED ALWAYS AS IDENTITY (
SEQUENCE NAME public."users_Id_seq"
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- TOC entry 3023 (class 0 OID 17378)
-- Dependencies: 200
-- Data for Name: employees; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.employees ("UserId", "FirstName", "LastName", "NationalityId", "BirthOfDate") VALUES (1, 'Halit Enes', 'KALAYCI', '12345678901', '2000-06-28');
--
-- TOC entry 3024 (class 0 OID 17381)
-- Dependencies: 201
-- Data for Name: employers; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.employers ("UserId", "CompanyName", "Phone", "VerifiedBySystem", "Website") VALUES (2, 'kodlamaio', '905123456789', false, 'www.kodlama.io');
--
-- TOC entry 3025 (class 0 OID 17384)
-- Dependencies: 202
-- Data for Name: jobpositions; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.jobpositions ("Id", "PositionName") OVERRIDING SYSTEM VALUE VALUES (1, 'Software Developer');
--
-- TOC entry 3027 (class 0 OID 17392)
-- Dependencies: 204
-- Data for Name: systemusers; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.systemusers ("UserId", "Roles") VALUES (3, 'sysadmin');
--
-- TOC entry 3028 (class 0 OID 17398)
-- Dependencies: 205
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.users ("Id", "Email", "Password", "EmailVerified") OVERRIDING SYSTEM VALUE VALUES (1, 'halitenes.kalayci@gmail.com', '1234', false);
INSERT INTO public.users ("Id", "Email", "Password", "EmailVerified") OVERRIDING SYSTEM VALUE VALUES (2, 'engindemirog@kodlama.io', '12345', false);
INSERT INTO public.users ("Id", "Email", "Password", "EmailVerified") OVERRIDING SYSTEM VALUE VALUES (3, 'denemesistem@gmail.com', '12345', true);
--
-- TOC entry 3037 (class 0 OID 0)
-- Dependencies: 207
-- Name: hibernate_sequence; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.hibernate_sequence', 1, false);
--
-- TOC entry 3038 (class 0 OID 0)
-- Dependencies: 203
-- Name: jobpositions_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public."jobpositions_Id_seq"', 1, true);
--
-- TOC entry 3039 (class 0 OID 0)
-- Dependencies: 206
-- Name: users_Id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public."users_Id_seq"', 3, true);
--
-- TOC entry 2887 (class 2606 OID 17408)
-- Name: users Email; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT "Email" UNIQUE ("Email");
--
-- TOC entry 2881 (class 2606 OID 17410)
-- Name: jobpositions Id; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.jobpositions
ADD CONSTRAINT "Id" PRIMARY KEY ("Id");
--
-- TOC entry 2883 (class 2606 OID 17412)
-- Name: jobpositions PositionName; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.jobpositions
ADD CONSTRAINT "PositionName" UNIQUE ("PositionName");
--
-- TOC entry 2875 (class 2606 OID 17414)
-- Name: employees TCKN; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.employees
ADD CONSTRAINT "TCKN" UNIQUE ("NationalityId");
--
-- TOC entry 2877 (class 2606 OID 17470)
-- Name: employees employees_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.employees
ADD CONSTRAINT employees_pkey PRIMARY KEY ("UserId");
--
-- TOC entry 2879 (class 2606 OID 17472)
-- Name: employers employers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.employers
ADD CONSTRAINT employers_pkey PRIMARY KEY ("UserId");
--
-- TOC entry 2885 (class 2606 OID 17474)
-- Name: systemusers systemusers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.systemusers
ADD CONSTRAINT systemusers_pkey PRIMARY KEY ("UserId");
--
-- TOC entry 2889 (class 2606 OID 17416)
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY ("Id");
--
-- TOC entry 2890 (class 2606 OID 17417)
-- Name: employees UserId; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.employees
ADD CONSTRAINT "UserId" FOREIGN KEY ("UserId") REFERENCES public.users("Id");
--
-- TOC entry 2891 (class 2606 OID 17422)
-- Name: employers UserId; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.employers
ADD CONSTRAINT "UserId" FOREIGN KEY ("UserId") REFERENCES public.users("Id");
--
-- TOC entry 2892 (class 2606 OID 17427)
-- Name: systemusers UserId; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.systemusers
ADD CONSTRAINT "UserId" FOREIGN KEY ("UserId") REFERENCES public.users("Id");
-- Completed on 2021-05-10 00:23:02
--
-- PostgreSQL database dump complete
--