-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdump
934 lines (625 loc) · 19.1 KB
/
dump
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: administrador; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE administrador (
id integer NOT NULL,
tipo character varying(150) NOT NULL,
idpessoa integer NOT NULL
);
ALTER TABLE administrador OWNER TO postgres;
--
-- Name: administrador_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE administrador_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE administrador_id_seq OWNER TO postgres;
--
-- Name: administrador_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE administrador_id_seq OWNED BY administrador.id;
--
-- Name: agenda; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE agenda (
id integer NOT NULL,
idsala integer NOT NULL,
status integer,
datainicio date,
datafim date,
idlocador integer,
horainicio character varying(5),
horafim character varying(5)
);
ALTER TABLE agenda OWNER TO postgres;
--
-- Name: agenda_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE agenda_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE agenda_id_seq OWNER TO postgres;
--
-- Name: agenda_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE agenda_id_seq OWNED BY agenda.id;
--
-- Name: agenda_participante; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE agenda_participante (
idagenda integer NOT NULL,
idparticipante integer NOT NULL
);
ALTER TABLE agenda_participante OWNER TO postgres;
--
-- Name: categoria; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE categoria (
id integer NOT NULL,
descricao character varying(150)
);
ALTER TABLE categoria OWNER TO postgres;
--
-- Name: categoria_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE categoria_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE categoria_id_seq OWNER TO postgres;
--
-- Name: categoria_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE categoria_id_seq OWNED BY categoria.id;
--
-- Name: imagem; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE imagem (
id integer NOT NULL,
caminho character varying(200)
);
ALTER TABLE imagem OWNER TO postgres;
--
-- Name: imagem_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE imagem_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE imagem_id_seq OWNER TO postgres;
--
-- Name: imagem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE imagem_id_seq OWNED BY imagem.id;
--
-- Name: localizacao; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE localizacao (
id integer NOT NULL,
rua character varying(150),
numero integer,
complemento integer,
cidade character varying(150),
estado character varying(150),
pais character varying(150)
);
ALTER TABLE localizacao OWNER TO postgres;
--
-- Name: localizacao_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE localizacao_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE localizacao_id_seq OWNER TO postgres;
--
-- Name: localizacao_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE localizacao_id_seq OWNED BY localizacao.id;
--
-- Name: participante_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE participante_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE participante_seq OWNER TO postgres;
--
-- Name: participante; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE participante (
id integer DEFAULT nextval('participante_seq'::regclass) NOT NULL,
email character varying(150) NOT NULL
);
ALTER TABLE participante OWNER TO postgres;
--
-- Name: pessoa; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE pessoa (
id integer NOT NULL,
nome character varying(150) NOT NULL,
sobrenome character varying(150) NOT NULL,
email character varying(150) NOT NULL,
sexo character(1) NOT NULL,
senha character varying(150) NOT NULL,
confirmarsenha character varying(150) NOT NULL,
telefone character varying(30)
);
ALTER TABLE pessoa OWNER TO postgres;
--
-- Name: pessoa_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE pessoa_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE pessoa_id_seq OWNER TO postgres;
--
-- Name: pessoa_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE pessoa_id_seq OWNED BY pessoa.id;
--
-- Name: sala; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE sala (
id integer NOT NULL,
idcategoria integer NOT NULL,
tamanhomin integer,
tamanhomax integer,
preco numeric,
idlocalizacao integer NOT NULL,
descricao character varying(150),
idadministrador integer NOT NULL,
estrela integer,
status integer,
numero integer
);
ALTER TABLE sala OWNER TO postgres;
--
-- Name: sala_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE sala_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE sala_id_seq OWNER TO postgres;
--
-- Name: sala_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE sala_id_seq OWNED BY sala.id;
--
-- Name: sala_imagem; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE sala_imagem (
idsala integer NOT NULL,
idimagem integer NOT NULL
);
ALTER TABLE sala_imagem OWNER TO postgres;
--
-- Name: sala_usuario; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE sala_usuario (
idsala integer NOT NULL,
idusuario integer NOT NULL
);
ALTER TABLE sala_usuario OWNER TO postgres;
--
-- Name: sala_utensilio; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE sala_utensilio (
idsala integer NOT NULL,
idutensilio integer NOT NULL,
qtd integer
);
ALTER TABLE sala_utensilio OWNER TO postgres;
--
-- Name: usuario; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE usuario (
id integer NOT NULL,
tipo character varying(150) NOT NULL,
idpessoa integer NOT NULL
);
ALTER TABLE usuario OWNER TO postgres;
--
-- Name: usuario_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE usuario_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE usuario_id_seq OWNER TO postgres;
--
-- Name: usuario_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE usuario_id_seq OWNED BY usuario.id;
--
-- Name: utensilio; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE utensilio (
id integer NOT NULL,
descricao character varying(150)
);
ALTER TABLE utensilio OWNER TO postgres;
--
-- Name: utensilio_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE utensilio_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE utensilio_id_seq OWNER TO postgres;
--
-- Name: utensilio_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE utensilio_id_seq OWNED BY utensilio.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY administrador ALTER COLUMN id SET DEFAULT nextval('administrador_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agenda ALTER COLUMN id SET DEFAULT nextval('agenda_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY categoria ALTER COLUMN id SET DEFAULT nextval('categoria_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY imagem ALTER COLUMN id SET DEFAULT nextval('imagem_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY localizacao ALTER COLUMN id SET DEFAULT nextval('localizacao_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY pessoa ALTER COLUMN id SET DEFAULT nextval('pessoa_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala ALTER COLUMN id SET DEFAULT nextval('sala_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY usuario ALTER COLUMN id SET DEFAULT nextval('usuario_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY utensilio ALTER COLUMN id SET DEFAULT nextval('utensilio_id_seq'::regclass);
--
-- Data for Name: administrador; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY administrador (id, tipo, idpessoa) FROM stdin;
1 Admin 1
2 Admin 2
\.
--
-- Name: administrador_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('administrador_id_seq', 11, true);
--
-- Data for Name: agenda; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY agenda (id, idsala, status, datainicio, datafim, idlocador, horainicio, horafim) FROM stdin;
2 1 0 2016-05-08 2016-05-09 2 08:00 18:00
3 2 1 2016-11-09 2016-11-11 1 05:28 08:28
5 1 0 2016-11-26 2016-11-27 1 09:00 14:00
6 1 0 2016-11-29 2016-11-29 1 07:00 19:00
4 2 1 2016-11-02 2016-11-04 1 05:28 08:28
7 1 1 2016-09-06 2016-09-07 1 04:00 18:00
\.
--
-- Name: agenda_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('agenda_id_seq', 7, true);
--
-- Data for Name: agenda_participante; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY agenda_participante (idagenda, idparticipante) FROM stdin;
2 4
2 5
2 6
3 24
3 25
7 26
\.
--
-- Data for Name: categoria; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY categoria (id, descricao) FROM stdin;
1 Executivo
2 Casual
\.
--
-- Name: categoria_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('categoria_id_seq', 10, true);
--
-- Data for Name: imagem; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY imagem (id, caminho) FROM stdin;
2 /resources/img/sala2.jpg
1 /resources/img/sala1.jpg
8 /resources/img/profile.png
\.
--
-- Name: imagem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('imagem_id_seq', 8, true);
--
-- Data for Name: localizacao; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY localizacao (id, rua, numero, complemento, cidade, estado, pais) FROM stdin;
2 Primeiro de maio 905 3302 Cariacica ES Brasil
1 Pereira Pinto 115 902 Vitoria ES Brasil
\.
--
-- Name: localizacao_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('localizacao_id_seq', 10, true);
--
-- Data for Name: participante; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY participante (id, email) FROM stdin;
24 ko
25 yguygyuy
26 jhuihiu
\.
--
-- Name: participante_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('participante_seq', 26, true);
--
-- Data for Name: pessoa; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY pessoa (id, nome, sobrenome, email, sexo, senha, confirmarsenha, telefone) FROM stdin;
1 Gustavo Britto [email protected] M 123456 123456 3333333
2 Bruno Mergh [email protected] M 123456 123456 4444444
3 Italo Lourenco [email protected] M 123456 123456 5555555
5 Matesu legal [email protected] M 123 123 1234
\.
--
-- Name: pessoa_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('pessoa_id_seq', 5, true);
--
-- Data for Name: sala; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY sala (id, idcategoria, tamanhomin, tamanhomax, preco, idlocalizacao, descricao, idadministrador, estrela, status, numero) FROM stdin;
2 2 1 100 1000 2 SALAAA 2 4 0 400
1 1 1 100 2000 1 Sala muito boa 1 5 0 202
\.
--
-- Name: sala_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('sala_id_seq', 9, true);
--
-- Data for Name: sala_imagem; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY sala_imagem (idsala, idimagem) FROM stdin;
1 1
2 2
2 8
\.
--
-- Data for Name: sala_usuario; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY sala_usuario (idsala, idusuario) FROM stdin;
\.
--
-- Data for Name: sala_utensilio; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY sala_utensilio (idsala, idutensilio, qtd) FROM stdin;
1 1 1
1 2 1
1 3 1
1 4 1
1 5 1
2 1 1
2 2 1
2 3 1
2 4 1
\.
--
-- Data for Name: usuario; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY usuario (id, tipo, idpessoa) FROM stdin;
5 Locador 3
6 Locatario 5
\.
--
-- Name: usuario_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('usuario_id_seq', 6, true);
--
-- Data for Name: utensilio; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY utensilio (id, descricao) FROM stdin;
1 Datashow
2 Quadro Branco
3 Mesa Central
4 Caixa de som
5 Microfone
\.
--
-- Name: utensilio_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('utensilio_id_seq', 20, true);
--
-- Name: administrador_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY administrador
ADD CONSTRAINT administrador_pkey PRIMARY KEY (id);
--
-- Name: agenda_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY agenda
ADD CONSTRAINT agenda_pkey PRIMARY KEY (id);
--
-- Name: categoria_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY categoria
ADD CONSTRAINT categoria_pkey PRIMARY KEY (id);
--
-- Name: imagem_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY imagem
ADD CONSTRAINT imagem_pkey PRIMARY KEY (id);
--
-- Name: localizacao_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY localizacao
ADD CONSTRAINT localizacao_pkey PRIMARY KEY (id);
--
-- Name: participante_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY participante
ADD CONSTRAINT participante_pkey PRIMARY KEY (id);
--
-- Name: pessoa_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY pessoa
ADD CONSTRAINT pessoa_pkey PRIMARY KEY (id);
--
-- Name: sala_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY sala
ADD CONSTRAINT sala_pkey PRIMARY KEY (id);
--
-- Name: usuario_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY usuario
ADD CONSTRAINT usuario_pkey PRIMARY KEY (id);
--
-- Name: utensilio_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
ALTER TABLE ONLY utensilio
ADD CONSTRAINT utensilio_pkey PRIMARY KEY (id);
--
-- Name: administrador_idpessoa_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY administrador
ADD CONSTRAINT administrador_idpessoa_fkey FOREIGN KEY (idpessoa) REFERENCES pessoa(id);
--
-- Name: agenda_participante_idagenda_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agenda_participante
ADD CONSTRAINT agenda_participante_idagenda_fkey FOREIGN KEY (idagenda) REFERENCES agenda(id);
--
-- Name: agenda_participante_idparticipante_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agenda_participante
ADD CONSTRAINT agenda_participante_idparticipante_fkey FOREIGN KEY (idparticipante) REFERENCES participante(id);
--
-- Name: pk_pessoa; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY agenda
ADD CONSTRAINT pk_pessoa FOREIGN KEY (idlocador) REFERENCES pessoa(id);
--
-- Name: sala_idadministrador_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala
ADD CONSTRAINT sala_idadministrador_fkey FOREIGN KEY (idadministrador) REFERENCES administrador(id);
--
-- Name: sala_idcategoria_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala
ADD CONSTRAINT sala_idcategoria_fkey FOREIGN KEY (idcategoria) REFERENCES categoria(id);
--
-- Name: sala_idlocalizacao_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala
ADD CONSTRAINT sala_idlocalizacao_fkey FOREIGN KEY (idlocalizacao) REFERENCES localizacao(id);
--
-- Name: sala_imagem_idimagem_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_imagem
ADD CONSTRAINT sala_imagem_idimagem_fkey FOREIGN KEY (idimagem) REFERENCES imagem(id);
--
-- Name: sala_imagem_idsala_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_imagem
ADD CONSTRAINT sala_imagem_idsala_fkey FOREIGN KEY (idsala) REFERENCES sala(id);
--
-- Name: sala_usuario_idsala_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_usuario
ADD CONSTRAINT sala_usuario_idsala_fkey FOREIGN KEY (idsala) REFERENCES sala(id);
--
-- Name: sala_usuario_idusuario_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_usuario
ADD CONSTRAINT sala_usuario_idusuario_fkey FOREIGN KEY (idusuario) REFERENCES usuario(id);
--
-- Name: sala_utensilio_idsala_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_utensilio
ADD CONSTRAINT sala_utensilio_idsala_fkey FOREIGN KEY (idsala) REFERENCES sala(id);
--
-- Name: sala_utensilio_idutensilio_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY sala_utensilio
ADD CONSTRAINT sala_utensilio_idutensilio_fkey FOREIGN KEY (idutensilio) REFERENCES utensilio(id);
--
-- Name: usuario_idpessoa_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY usuario
ADD CONSTRAINT usuario_idpessoa_fkey FOREIGN KEY (idpessoa) REFERENCES pessoa(id);
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--