-
Notifications
You must be signed in to change notification settings - Fork 1
/
pethelp.sql
367 lines (252 loc) · 9.46 KB
/
pethelp.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
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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.4
-- Dumped by pg_dump version 14.4
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;
--
-- Name: pet_report; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.pet_report (
id integer NOT NULL,
username character varying(30),
sheltername character varying(30),
race character varying(30),
color character varying(30),
image character varying(50),
type character varying(15),
phone character varying(15)
);
ALTER TABLE public.pet_report OWNER TO postgres;
--
-- Name: pet_report_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.pet_report_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.pet_report_id_seq OWNER TO postgres;
--
-- Name: pet_report_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.pet_report_id_seq OWNED BY public.pet_report.id;
--
-- Name: shelter; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.shelter (
id integer NOT NULL,
name character varying(30) NOT NULL,
location character varying(120)
);
ALTER TABLE public.shelter OWNER TO postgres;
--
-- Name: shelter_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.shelter_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.shelter_id_seq OWNER TO postgres;
--
-- Name: shelter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.shelter_id_seq OWNED BY public.shelter.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.users (
id integer NOT NULL,
name character varying(30) NOT NULL,
email character varying(120) NOT NULL,
address character varying(120),
city character varying(30) NOT NULL,
postcode character varying(12),
password character varying(250) NOT NULL,
isadmin boolean DEFAULT false
);
ALTER TABLE public.users OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.users_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO postgres;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- Name: usertype; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.usertype (
id integer NOT NULL,
user_id integer,
type character varying(30) NOT NULL,
display_type character varying(30) NOT NULL
);
ALTER TABLE public.usertype OWNER TO postgres;
--
-- Name: usertype_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.usertype_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.usertype_id_seq OWNER TO postgres;
--
-- Name: usertype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.usertype_id_seq OWNED BY public.usertype.id;
--
-- Name: pet_report id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.pet_report ALTER COLUMN id SET DEFAULT nextval('public.pet_report_id_seq'::regclass);
--
-- Name: shelter id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.shelter ALTER COLUMN id SET DEFAULT nextval('public.shelter_id_seq'::regclass);
--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- Name: usertype id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.usertype ALTER COLUMN id SET DEFAULT nextval('public.usertype_id_seq'::regclass);
--
-- Data for Name: pet_report; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.pet_report (id, username, sheltername, race, color, image, type, phone) FROM stdin;
71 alissa Sabadell No race Black and white 1662285858854.jpg Cat \N
72 test Valencia No race Gray 1662285902376.jpg Cat \N
73 Alissa Barcelona Dont know Yellow and black stripes 1662285958169.jpg Cat \N
74 test Sabadell Dont know Caramel 1662285996189.jpg Dog \N
75 Alissa Sabadell St. Bernard Black, white and orange 1662286069203.jpg Dog \N
77 test Terrasa Pit bull Caramel 1662286395245.jpg Dog \N
78 test Sabadell Pinsher Black and caramel 1662286478186.jpg Dog \N
79 test Barcelona No race Orange 1662286612244.jpg Cat \N
80 test Barcelona Persian White 1662286810147.jpg Cat \N
81 test Barcelona No race Black 1662286878313.jpg Cat \N
\.
--
-- Data for Name: shelter; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.shelter (id, name, location) FROM stdin;
\.
--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.users (id, name, email, address, city, postcode, password, isadmin) FROM stdin;
1 usman [email protected] corts catalanes Barcelona b089 pass1 f
2 Gloria [email protected] calle valencia Barcelona b020 pass1 f
3 Gabi [email protected] calle montaner valencia a89 pass1 f
4 isha [email protected] calle rocafort Barcelona b020 pass1 f
5 alisa [email protected] calle taragona girona f30 pass1 f
9 test123 [email protected] \N asasas 1845454 $2b$10$lnjQ5qyQ20yZ15N327TvLe8IyI52nArGHgl5mnEw8sVqevvZlou2e f
10 testform [email protected] rua 5 Sabadell 08208 $2b$10$rZeWFCt78RiqbgtFf/wb4OoPZpb.1yknY5FjMXjS2p8nuMEhJGk5i f
11 test12 [email protected] \N asasas 1845454 $2b$10$wCkXr0fUJbl0Q.GIVkdSoemmFdJqlEgpioX9a8g1xBgq/1a7LNuOG f
12 testagain [email protected] rua gato barcelona 08208 $2b$10$IxGjZ87IaWFr9BhQkcoVR..r3RIAb.JLAiL/9Y4.8rhHjAw844xRu f
13 holaaaaa [email protected] calle aragon barcelona 08208 $2b$10$T/G1qEFCh6gqBCR1ZdFdyuwAitWtQO8FNo.SzO9SM5xcMIFcZlI0G f
14 alissatest [email protected] calle 6 Madrid 08209 $2b$10$7PDMN0gyFqRwJsWhb81tk.3wucVqHOk.5Ss4TEtNSO6eUMH0JwCwO f
15 alissa [email protected] Placa 5 sabadell 08208 $2b$10$945k62LpqgWrUxWv8ssJOO1hDxALAK5AA4sRc4BECJ9QCryvmLyvi f
16 jojo123 [email protected] calle do gato Sabadell 08208 $2b$10$PBfsGiq60930wUcdTMI6Y.kyNw3PyIj0N5E/4Fvmao9AS.zsk3pq. f
17 mimi123 [email protected] calle 123 sabadell 08208 $2b$10$VwXkKsl3gGfn4Z7N.ZTed.W0Rs7fRsBC4YSu.fQ4dp/U7246Y.LxG f
18 test123456 [email protected] nulllll 1 sabadell 08208 $2b$10$rIP5AemAj.zHARwNXY6f4uHb1XIZa89NqzCcbslMh2kvert.lXAIy f
19 alissa [email protected] Plaça Lluis Casassas, 4, 4, 2 Sabadell 08208 $2b$10$q6JpMtod7isPyJ4XUnyu5eSFdomK4Z0apDHIMppr/Rwo112VSopKa f
20 Alissa Nishihara [email protected] Plaça Lluis Casassas, 4, 4, 2 Sabadell 08208 $2b$10$CMM4HLBXH/H71yXrDYNeCux3QNgxtYQ.cz.wwryz/QLxN90yQ3y5a f
\.
--
-- Data for Name: usertype; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.usertype (id, user_id, type, display_type) FROM stdin;
\.
--
-- Name: pet_report_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.pet_report_id_seq', 85, true);
--
-- Name: shelter_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.shelter_id_seq', 1, false);
--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.users_id_seq', 20, true);
--
-- Name: usertype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public.usertype_id_seq', 1, false);
--
-- Name: pet_report pet_report_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.pet_report
ADD CONSTRAINT pet_report_pkey PRIMARY KEY (id);
--
-- Name: shelter shelter_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.shelter
ADD CONSTRAINT shelter_pkey PRIMARY KEY (id);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: usertype usertype_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.usertype
ADD CONSTRAINT usertype_pkey PRIMARY KEY (id);
--
-- Name: usertype usertype_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.usertype
ADD CONSTRAINT usertype_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: TABLE pet_report; Type: ACL; Schema: public; Owner: postgres
--
GRANT SELECT,INSERT ON TABLE public.pet_report TO PUBLIC;
GRANT SELECT,INSERT ON TABLE public.pet_report TO pethelp;
--
-- Name: TABLE shelter; Type: ACL; Schema: public; Owner: postgres
--
GRANT ALL ON TABLE public.shelter TO pethelp;
--
-- Name: TABLE users; Type: ACL; Schema: public; Owner: postgres
--
GRANT ALL ON TABLE public.users TO pethelp;
--
-- Name: SEQUENCE users_id_seq; Type: ACL; Schema: public; Owner: postgres
--
GRANT SELECT,USAGE ON SEQUENCE public.users_id_seq TO pethelp;
--
-- Name: TABLE usertype; Type: ACL; Schema: public; Owner: postgres
--
GRANT ALL ON TABLE public.usertype TO pethelp;
--
-- PostgreSQL database dump complete
--