source: trunk/doc-expressolivre/debian/arqs-conf/workflow.dump @ 1255

Revision 1255, 23.9 KB checked in by niltonneto, 15 years ago (diff)

Ticket #596 - Inclusão de rotina para criar o banco do módulo Workflow.

  • Property svn:executable set to *
Line 
1--
2-- PostgreSQL database dump
3--
4
5SET client_encoding = 'LATIN1';
6SET standard_conforming_strings = off;
7SET check_function_bodies = false;
8SET client_min_messages = warning;
9SET escape_string_warning = off;
10
11--
12-- Name: workflow; Type: DATABASE; Schema: -; Owner: postgres
13--
14
15CREATE DATABASE workflow WITH TEMPLATE = template0 ENCODING = 'LATIN1';
16
17
18ALTER DATABASE workflow OWNER TO postgres;
19
20CREATE USER admin_workflow WITH PASSWORD 'admin_workflow' NOCREATEDB NOCREATEUSER VALID UNTIL 'infinity';
21CREATE GROUP workflow;
22ALTER GROUP workflow ADD USER admin_workflow;
23GRANT workflow TO admin_workflow;
24CREATE USER admin_cds WITH PASSWORD 'admin_cds' NOCREATEDB NOCREATEUSER VALID UNTIL 'infinity';
25ALTER GROUP workflow ADD USER admin_cds;
26GRANT workflow TO admin_cds;
27
28\connect workflow
29
30SET client_encoding = 'LATIN1';
31SET standard_conforming_strings = off;
32SET check_function_bodies = false;
33SET client_min_messages = warning;
34SET escape_string_warning = off;
35
36--
37-- Name: cds; Type: SCHEMA; Schema: -; Owner: admin_cds
38--
39
40CREATE SCHEMA cds;
41
42
43ALTER SCHEMA cds OWNER TO admin_cds;
44
45SET search_path = cds, pg_catalog;
46
47SET default_tablespace = '';
48
49SET default_with_oids = false;
50
51--
52-- Name: cdcollection; Type: TABLE; Schema: cds; Owner: admin_cds; Tablespace:
53--
54
55CREATE TABLE cdcollection (
56    cdid integer NOT NULL,
57    title character varying(200),
58    status character varying(40),
59    usuario character varying(200)
60);
61
62
63ALTER TABLE cds.cdcollection OWNER TO admin_cds;
64
65--
66-- Name: TABLE cdcollection; Type: COMMENT; Schema: cds; Owner: admin_cds
67--
68
69COMMENT ON TABLE cdcollection IS 'Exemplo de Empréstimo de CDs';
70
71
72SET search_path = public, pg_catalog;
73
74--
75-- Name: area; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
76--
77
78CREATE TABLE area (
79    organizacao_id integer NOT NULL,
80    area_id integer NOT NULL,
81    area_status_id integer NOT NULL,
82    areasup_organizacao_id integer,
83    superior_area_id integer,
84    centro_custo_id integer,
85    titular_funcionario_id integer,
86    substituto_funcionario_id integer,
87    sigla character varying(20) NOT NULL,
88    descricao character varying(100) NOT NULL,
89    ativa character varying(1) NOT NULL,
90    auxiliar_funcionario_id integer
91);
92
93
94ALTER TABLE public.area OWNER TO postgres;
95
96--
97-- Name: area_area_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
98--
99
100CREATE SEQUENCE area_area_id_seq
101    START WITH 1
102    INCREMENT BY 1
103    NO MAXVALUE
104    NO MINVALUE
105    CACHE 1;
106
107
108ALTER TABLE public.area_area_id_seq OWNER TO postgres;
109
110--
111-- Name: area_area_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
112--
113
114ALTER SEQUENCE area_area_id_seq OWNED BY area.area_id;
115
116
117--
118-- Name: area_area_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
119--
120
121SELECT pg_catalog.setval('area_area_id_seq', 1, false);
122
123
124--
125-- Name: area_status; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
126--
127
128CREATE TABLE area_status (
129    area_status_id integer NOT NULL,
130    organizacao_id integer NOT NULL,
131    descricao character varying(50) NOT NULL,
132    nivel integer NOT NULL
133);
134
135
136ALTER TABLE public.area_status OWNER TO postgres;
137
138--
139-- Name: area_status_area_status_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
140--
141
142CREATE SEQUENCE area_status_area_status_id_seq
143    START WITH 1
144    INCREMENT BY 1
145    NO MAXVALUE
146    NO MINVALUE
147    CACHE 1;
148
149
150ALTER TABLE public.area_status_area_status_id_seq OWNER TO postgres;
151
152--
153-- Name: area_status_area_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
154--
155
156ALTER SEQUENCE area_status_area_status_id_seq OWNED BY area_status.area_status_id;
157
158
159--
160-- Name: area_status_area_status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
161--
162
163SELECT pg_catalog.setval('area_status_area_status_id_seq', 1, false);
164
165
166--
167-- Name: cargo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
168--
169
170CREATE TABLE cargo (
171    cargo_id integer NOT NULL,
172    descricao character varying(150),
173    organizacao_id integer
174);
175
176
177ALTER TABLE public.cargo OWNER TO postgres;
178
179--
180-- Name: cargo_cargo_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
181--
182
183CREATE SEQUENCE cargo_cargo_id_seq
184    START WITH 1
185    INCREMENT BY 1
186    NO MAXVALUE
187    NO MINVALUE
188    CACHE 1;
189
190
191ALTER TABLE public.cargo_cargo_id_seq OWNER TO postgres;
192
193--
194-- Name: cargo_cargo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
195--
196
197ALTER SEQUENCE cargo_cargo_id_seq OWNED BY cargo.cargo_id;
198
199
200--
201-- Name: cargo_cargo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
202--
203
204SELECT pg_catalog.setval('cargo_cargo_id_seq', 1, false);
205
206
207--
208-- Name: centro_custo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
209--
210
211CREATE TABLE centro_custo (
212    organizacao_id integer NOT NULL,
213    centro_custo_id integer NOT NULL,
214    nm_centro_custo integer NOT NULL,
215    grupo character varying(30),
216    descricao character varying(100) NOT NULL
217);
218
219
220ALTER TABLE public.centro_custo OWNER TO postgres;
221
222--
223-- Name: centro_custo_centro_custo_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
224--
225
226CREATE SEQUENCE centro_custo_centro_custo_id_seq
227    START WITH 1
228    INCREMENT BY 1
229    NO MAXVALUE
230    NO MINVALUE
231    CACHE 1;
232
233
234ALTER TABLE public.centro_custo_centro_custo_id_seq OWNER TO postgres;
235
236--
237-- Name: centro_custo_centro_custo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
238--
239
240ALTER SEQUENCE centro_custo_centro_custo_id_seq OWNED BY centro_custo.centro_custo_id;
241
242
243--
244-- Name: centro_custo_centro_custo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
245--
246
247SELECT pg_catalog.setval('centro_custo_centro_custo_id_seq', 1, false);
248
249
250--
251-- Name: funcionario; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
252--
253
254CREATE TABLE funcionario (
255    funcionario_id integer NOT NULL,
256    area_id integer NOT NULL,
257    localidade_id integer NOT NULL,
258    centro_custo_id integer,
259    organizacao_id integer NOT NULL,
260    funcionario_status_id integer NOT NULL,
261    cargo_id integer,
262    nivel smallint,
263    funcionario_categoria_id integer
264);
265
266
267ALTER TABLE public.funcionario OWNER TO postgres;
268
269--
270-- Name: funcionario_categoria; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
271--
272
273CREATE TABLE funcionario_categoria (
274    funcionario_categoria_id integer NOT NULL,
275    descricao character varying(150),
276    organizacao_id integer
277);
278
279
280ALTER TABLE public.funcionario_categoria OWNER TO postgres;
281
282--
283-- Name: funcionario_categoria_funcionario_categoria_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
284--
285
286CREATE SEQUENCE funcionario_categoria_funcionario_categoria_id_seq
287    START WITH 1
288    INCREMENT BY 1
289    NO MAXVALUE
290    NO MINVALUE
291    CACHE 1;
292
293
294ALTER TABLE public.funcionario_categoria_funcionario_categoria_id_seq OWNER TO postgres;
295
296--
297-- Name: funcionario_categoria_funcionario_categoria_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
298--
299
300ALTER SEQUENCE funcionario_categoria_funcionario_categoria_id_seq OWNED BY funcionario_categoria.funcionario_categoria_id;
301
302
303--
304-- Name: funcionario_categoria_funcionario_categoria_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
305--
306
307SELECT pg_catalog.setval('funcionario_categoria_funcionario_categoria_id_seq', 1, false);
308
309
310--
311-- Name: funcionario_status; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
312--
313
314CREATE TABLE funcionario_status (
315    funcionario_status_id integer NOT NULL,
316    descricao character varying(50) NOT NULL,
317    exibir character varying(1) NOT NULL,
318    organizacao_id integer NOT NULL
319);
320
321
322ALTER TABLE public.funcionario_status OWNER TO postgres;
323
324--
325-- Name: funcionario_status_funcionario_status_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
326--
327
328CREATE SEQUENCE funcionario_status_funcionario_status_id_seq
329    START WITH 1
330    INCREMENT BY 1
331    NO MAXVALUE
332    NO MINVALUE
333    CACHE 1;
334
335
336ALTER TABLE public.funcionario_status_funcionario_status_id_seq OWNER TO postgres;
337
338--
339-- Name: funcionario_status_funcionario_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
340--
341
342ALTER SEQUENCE funcionario_status_funcionario_status_id_seq OWNED BY funcionario_status.funcionario_status_id;
343
344
345--
346-- Name: funcionario_status_funcionario_status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
347--
348
349SELECT pg_catalog.setval('funcionario_status_funcionario_status_id_seq', 1, false);
350
351
352--
353-- Name: localidade; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
354--
355
356CREATE TABLE localidade (
357    organizacao_id integer NOT NULL,
358    localidade_id integer NOT NULL,
359    centro_custo_id integer,
360    descricao character varying(50) NOT NULL
361);
362
363
364ALTER TABLE public.localidade OWNER TO postgres;
365
366--
367-- Name: localidade_localidade_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
368--
369
370CREATE SEQUENCE localidade_localidade_id_seq
371    START WITH 1
372    INCREMENT BY 1
373    NO MAXVALUE
374    NO MINVALUE
375    CACHE 1;
376
377
378ALTER TABLE public.localidade_localidade_id_seq OWNER TO postgres;
379
380--
381-- Name: localidade_localidade_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
382--
383
384ALTER SEQUENCE localidade_localidade_id_seq OWNED BY localidade.localidade_id;
385
386
387--
388-- Name: localidade_localidade_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
389--
390
391SELECT pg_catalog.setval('localidade_localidade_id_seq', 1, false);
392
393
394--
395-- Name: organizacao; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
396--
397
398CREATE TABLE organizacao (
399    organizacao_id integer NOT NULL,
400    nome character varying(20) NOT NULL,
401    descricao character varying(100) NOT NULL,
402    url_imagem character varying(200),
403    ativa character varying(1) NOT NULL
404);
405
406
407ALTER TABLE public.organizacao OWNER TO postgres;
408
409--
410-- Name: organizacao_organizacao_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
411--
412
413CREATE SEQUENCE organizacao_organizacao_id_seq
414    START WITH 1
415    INCREMENT BY 1
416    NO MAXVALUE
417    NO MINVALUE
418    CACHE 1;
419
420
421ALTER TABLE public.organizacao_organizacao_id_seq OWNER TO postgres;
422
423--
424-- Name: organizacao_organizacao_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
425--
426
427ALTER SEQUENCE organizacao_organizacao_id_seq OWNED BY organizacao.organizacao_id;
428
429
430--
431-- Name: organizacao_organizacao_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
432--
433
434SELECT pg_catalog.setval('organizacao_organizacao_id_seq', 1, false);
435
436
437--
438-- Name: area_id; Type: DEFAULT; Schema: public; Owner: postgres
439--
440
441ALTER TABLE area ALTER COLUMN area_id SET DEFAULT nextval('area_area_id_seq'::regclass);
442
443
444--
445-- Name: area_status_id; Type: DEFAULT; Schema: public; Owner: postgres
446--
447
448ALTER TABLE area_status ALTER COLUMN area_status_id SET DEFAULT nextval('area_status_area_status_id_seq'::regclass);
449
450
451--
452-- Name: cargo_id; Type: DEFAULT; Schema: public; Owner: postgres
453--
454
455ALTER TABLE cargo ALTER COLUMN cargo_id SET DEFAULT nextval('cargo_cargo_id_seq'::regclass);
456
457
458--
459-- Name: centro_custo_id; Type: DEFAULT; Schema: public; Owner: postgres
460--
461
462ALTER TABLE centro_custo ALTER COLUMN centro_custo_id SET DEFAULT nextval('centro_custo_centro_custo_id_seq'::regclass);
463
464
465--
466-- Name: funcionario_categoria_id; Type: DEFAULT; Schema: public; Owner: postgres
467--
468
469ALTER TABLE funcionario_categoria ALTER COLUMN funcionario_categoria_id SET DEFAULT nextval('funcionario_categoria_funcionario_categoria_id_seq'::regclass);
470
471
472--
473-- Name: funcionario_status_id; Type: DEFAULT; Schema: public; Owner: postgres
474--
475
476ALTER TABLE funcionario_status ALTER COLUMN funcionario_status_id SET DEFAULT nextval('funcionario_status_funcionario_status_id_seq'::regclass);
477
478
479--
480-- Name: localidade_id; Type: DEFAULT; Schema: public; Owner: postgres
481--
482
483ALTER TABLE localidade ALTER COLUMN localidade_id SET DEFAULT nextval('localidade_localidade_id_seq'::regclass);
484
485
486--
487-- Name: organizacao_id; Type: DEFAULT; Schema: public; Owner: postgres
488--
489
490ALTER TABLE organizacao ALTER COLUMN organizacao_id SET DEFAULT nextval('organizacao_organizacao_id_seq'::regclass);
491
492
493SET search_path = cds, pg_catalog;
494
495--
496-- Data for Name: cdcollection; Type: TABLE DATA; Schema: cds; Owner: admin_cds
497--
498
499INSERT INTO cdcollection VALUES (1, 'Compact Disc 1', 'disponivel', NULL);
500INSERT INTO cdcollection VALUES (2, 'Compact Disc 2', 'disponivel', NULL);
501INSERT INTO cdcollection VALUES (3, 'Compact Disc 3', 'disponivel', NULL);
502
503
504SET search_path = cds, pg_catalog;
505
506--
507-- Name: cdcollection_pkey; Type: CONSTRAINT; Schema: cds; Owner: admin_cds; Tablespace:
508--
509
510ALTER TABLE ONLY cdcollection
511    ADD CONSTRAINT cdcollection_pkey PRIMARY KEY (cdid);
512
513
514SET search_path = public, pg_catalog;
515
516--
517-- Name: area_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
518--
519
520ALTER TABLE ONLY area
521    ADD CONSTRAINT area_pkey PRIMARY KEY (organizacao_id, area_id);
522
523
524--
525-- Name: areastatus_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
526--
527
528ALTER TABLE ONLY area_status
529    ADD CONSTRAINT areastatus_pkey PRIMARY KEY (area_status_id, organizacao_id);
530
531
532--
533-- Name: centrocusto_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
534--
535
536ALTER TABLE ONLY centro_custo
537    ADD CONSTRAINT centrocusto_pkey PRIMARY KEY (organizacao_id, centro_custo_id);
538
539
540--
541-- Name: funcionario_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
542--
543
544ALTER TABLE ONLY funcionario
545    ADD CONSTRAINT funcionario_pkey PRIMARY KEY (funcionario_id);
546
547
548--
549-- Name: funcionario_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
550--
551
552ALTER TABLE ONLY funcionario_status
553    ADD CONSTRAINT funcionario_status_pkey PRIMARY KEY (funcionario_status_id);
554
555
556--
557-- Name: localidade_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
558--
559
560ALTER TABLE ONLY localidade
561    ADD CONSTRAINT localidade_pkey PRIMARY KEY (organizacao_id, localidade_id);
562
563
564--
565-- Name: organizacao_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
566--
567
568ALTER TABLE ONLY organizacao
569    ADD CONSTRAINT organizacao_pkey PRIMARY KEY (organizacao_id);
570
571
572--
573-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
574--
575
576ALTER TABLE ONLY funcionario_status
577    ADD CONSTRAINT "$1" FOREIGN KEY (organizacao_id) REFERENCES organizacao(organizacao_id);
578
579
580--
581-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
582--
583
584ALTER TABLE ONLY area_status
585    ADD CONSTRAINT "$1" FOREIGN KEY (organizacao_id) REFERENCES organizacao(organizacao_id);
586
587
588--
589-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
590--
591
592ALTER TABLE ONLY centro_custo
593    ADD CONSTRAINT "$1" FOREIGN KEY (organizacao_id) REFERENCES organizacao(organizacao_id);
594
595
596--
597-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
598--
599
600ALTER TABLE ONLY localidade
601    ADD CONSTRAINT "$1" FOREIGN KEY (centro_custo_id, organizacao_id) REFERENCES centro_custo(centro_custo_id, organizacao_id);
602
603
604--
605-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
606--
607
608ALTER TABLE ONLY funcionario
609    ADD CONSTRAINT "$1" FOREIGN KEY (organizacao_id, centro_custo_id) REFERENCES centro_custo(organizacao_id, centro_custo_id);
610
611
612--
613-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
614--
615
616ALTER TABLE ONLY area
617    ADD CONSTRAINT "$1" FOREIGN KEY (superior_area_id, areasup_organizacao_id) REFERENCES area(area_id, organizacao_id);
618
619
620--
621-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
622--
623
624ALTER TABLE ONLY localidade
625    ADD CONSTRAINT "$2" FOREIGN KEY (organizacao_id) REFERENCES organizacao(organizacao_id);
626
627
628--
629-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
630--
631
632ALTER TABLE ONLY funcionario
633    ADD CONSTRAINT "$2" FOREIGN KEY (organizacao_id, localidade_id) REFERENCES localidade(organizacao_id, localidade_id);
634
635
636--
637-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
638--
639
640ALTER TABLE ONLY area
641    ADD CONSTRAINT "$2" FOREIGN KEY (centro_custo_id, organizacao_id) REFERENCES centro_custo(centro_custo_id, organizacao_id);
642
643
644--
645-- Name: $3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
646--
647
648ALTER TABLE ONLY funcionario
649    ADD CONSTRAINT "$3" FOREIGN KEY (organizacao_id, area_id) REFERENCES area(organizacao_id, area_id);
650
651
652--
653-- Name: $3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
654--
655
656ALTER TABLE ONLY area
657    ADD CONSTRAINT "$3" FOREIGN KEY (titular_funcionario_id) REFERENCES funcionario(funcionario_id);
658
659
660--
661-- Name: $4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
662--
663
664ALTER TABLE ONLY funcionario
665    ADD CONSTRAINT "$4" FOREIGN KEY (funcionario_status_id) REFERENCES funcionario_status(funcionario_status_id);
666
667
668--
669-- Name: $4; Type: FK CONSTRAINT; Schema: public; Owner: postgres
670--
671
672ALTER TABLE ONLY area
673    ADD CONSTRAINT "$4" FOREIGN KEY (substituto_funcionario_id) REFERENCES funcionario(funcionario_id);
674
675
676--
677-- Name: $5; Type: FK CONSTRAINT; Schema: public; Owner: postgres
678--
679
680ALTER TABLE ONLY area
681    ADD CONSTRAINT "$5" FOREIGN KEY (organizacao_id) REFERENCES organizacao(organizacao_id);
682
683
684--
685-- Name: $6; Type: FK CONSTRAINT; Schema: public; Owner: postgres
686--
687
688ALTER TABLE ONLY area
689    ADD CONSTRAINT "$6" FOREIGN KEY (area_status_id, organizacao_id) REFERENCES area_status(area_status_id, organizacao_id);
690
691
692--
693-- Name: $7; Type: FK CONSTRAINT; Schema: public; Owner: postgres
694--
695
696ALTER TABLE ONLY area
697    ADD CONSTRAINT "$7" FOREIGN KEY (auxiliar_funcionario_id) REFERENCES funcionario(funcionario_id);
698
699
700--
701-- Name: cds; Type: ACL; Schema: -; Owner: admin_cds
702--
703
704REVOKE ALL ON SCHEMA cds FROM PUBLIC;
705REVOKE ALL ON SCHEMA cds FROM admin_cds;
706GRANT ALL ON SCHEMA cds TO admin_cds;
707GRANT ALL ON SCHEMA cds TO postgres;
708
709
710--
711-- Name: public; Type: ACL; Schema: -; Owner: postgres
712--
713
714REVOKE ALL ON SCHEMA public FROM PUBLIC;
715REVOKE ALL ON SCHEMA public FROM postgres;
716GRANT ALL ON SCHEMA public TO postgres;
717GRANT ALL ON SCHEMA public TO PUBLIC;
718
719
720SET search_path = cds, pg_catalog;
721
722--
723-- Name: cdcollection; Type: ACL; Schema: cds; Owner: admin_cds
724--
725
726REVOKE ALL ON TABLE cdcollection FROM PUBLIC;
727REVOKE ALL ON TABLE cdcollection FROM admin_cds;
728GRANT ALL ON TABLE cdcollection TO admin_cds;
729GRANT ALL ON TABLE cdcollection TO postgres WITH GRANT OPTION;
730
731
732SET search_path = public, pg_catalog;
733
734--
735-- Name: area; Type: ACL; Schema: public; Owner: postgres
736--
737
738REVOKE ALL ON TABLE area FROM PUBLIC;
739REVOKE ALL ON TABLE area FROM postgres;
740GRANT ALL ON TABLE area TO postgres;
741GRANT ALL ON TABLE area TO admin_workflow;
742GRANT SELECT ON TABLE area TO PUBLIC;
743
744
745--
746-- Name: area_area_id_seq; Type: ACL; Schema: public; Owner: postgres
747--
748
749REVOKE ALL ON SEQUENCE area_area_id_seq FROM PUBLIC;
750REVOKE ALL ON SEQUENCE area_area_id_seq FROM postgres;
751GRANT ALL ON SEQUENCE area_area_id_seq TO postgres;
752GRANT ALL ON SEQUENCE area_area_id_seq TO admin_workflow;
753GRANT SELECT ON SEQUENCE area_area_id_seq TO PUBLIC;
754
755
756--
757-- Name: area_status; Type: ACL; Schema: public; Owner: postgres
758--
759
760REVOKE ALL ON TABLE area_status FROM PUBLIC;
761REVOKE ALL ON TABLE area_status FROM postgres;
762GRANT ALL ON TABLE area_status TO postgres;
763GRANT ALL ON TABLE area_status TO admin_workflow;
764GRANT SELECT ON TABLE area_status TO PUBLIC;
765
766
767--
768-- Name: area_status_area_status_id_seq; Type: ACL; Schema: public; Owner: postgres
769--
770
771REVOKE ALL ON SEQUENCE area_status_area_status_id_seq FROM PUBLIC;
772REVOKE ALL ON SEQUENCE area_status_area_status_id_seq FROM postgres;
773GRANT ALL ON SEQUENCE area_status_area_status_id_seq TO postgres;
774GRANT ALL ON SEQUENCE area_status_area_status_id_seq TO admin_workflow;
775GRANT SELECT ON SEQUENCE area_status_area_status_id_seq TO PUBLIC;
776
777
778--
779-- Name: cargo; Type: ACL; Schema: public; Owner: postgres
780--
781
782REVOKE ALL ON TABLE cargo FROM PUBLIC;
783REVOKE ALL ON TABLE cargo FROM postgres;
784GRANT ALL ON TABLE cargo TO postgres;
785GRANT ALL ON TABLE cargo TO admin_workflow;
786GRANT SELECT ON TABLE cargo TO PUBLIC;
787
788
789--
790-- Name: cargo_cargo_id_seq; Type: ACL; Schema: public; Owner: postgres
791--
792
793REVOKE ALL ON SEQUENCE cargo_cargo_id_seq FROM PUBLIC;
794REVOKE ALL ON SEQUENCE cargo_cargo_id_seq FROM postgres;
795GRANT ALL ON SEQUENCE cargo_cargo_id_seq TO postgres;
796GRANT ALL ON SEQUENCE cargo_cargo_id_seq TO admin_workflow;
797GRANT SELECT ON SEQUENCE cargo_cargo_id_seq TO PUBLIC;
798
799
800--
801-- Name: centro_custo; Type: ACL; Schema: public; Owner: postgres
802--
803
804REVOKE ALL ON TABLE centro_custo FROM PUBLIC;
805REVOKE ALL ON TABLE centro_custo FROM postgres;
806GRANT ALL ON TABLE centro_custo TO postgres;
807GRANT ALL ON TABLE centro_custo TO admin_workflow;
808GRANT SELECT ON TABLE centro_custo TO PUBLIC;
809
810
811--
812-- Name: centro_custo_centro_custo_id_seq; Type: ACL; Schema: public; Owner: postgres
813--
814
815REVOKE ALL ON SEQUENCE centro_custo_centro_custo_id_seq FROM PUBLIC;
816REVOKE ALL ON SEQUENCE centro_custo_centro_custo_id_seq FROM postgres;
817GRANT ALL ON SEQUENCE centro_custo_centro_custo_id_seq TO postgres;
818GRANT ALL ON SEQUENCE centro_custo_centro_custo_id_seq TO admin_workflow;
819GRANT SELECT ON SEQUENCE centro_custo_centro_custo_id_seq TO PUBLIC;
820
821
822--
823-- Name: funcionario; Type: ACL; Schema: public; Owner: postgres
824--
825
826REVOKE ALL ON TABLE funcionario FROM PUBLIC;
827REVOKE ALL ON TABLE funcionario FROM postgres;
828GRANT ALL ON TABLE funcionario TO postgres;
829GRANT ALL ON TABLE funcionario TO admin_workflow;
830GRANT SELECT ON TABLE funcionario TO PUBLIC;
831
832
833--
834-- Name: funcionario_categoria; Type: ACL; Schema: public; Owner: postgres
835--
836
837REVOKE ALL ON TABLE funcionario_categoria FROM PUBLIC;
838REVOKE ALL ON TABLE funcionario_categoria FROM postgres;
839GRANT ALL ON TABLE funcionario_categoria TO postgres;
840GRANT ALL ON TABLE funcionario_categoria TO admin_workflow;
841GRANT SELECT ON TABLE funcionario_categoria TO PUBLIC;
842
843
844--
845-- Name: funcionario_categoria_funcionario_categoria_id_seq; Type: ACL; Schema: public; Owner: postgres
846--
847
848REVOKE ALL ON SEQUENCE funcionario_categoria_funcionario_categoria_id_seq FROM PUBLIC;
849REVOKE ALL ON SEQUENCE funcionario_categoria_funcionario_categoria_id_seq FROM postgres;
850GRANT ALL ON SEQUENCE funcionario_categoria_funcionario_categoria_id_seq TO postgres;
851GRANT ALL ON SEQUENCE funcionario_categoria_funcionario_categoria_id_seq TO admin_workflow;
852GRANT SELECT ON SEQUENCE funcionario_categoria_funcionario_categoria_id_seq TO PUBLIC;
853
854
855--
856-- Name: funcionario_status; Type: ACL; Schema: public; Owner: postgres
857--
858
859REVOKE ALL ON TABLE funcionario_status FROM PUBLIC;
860REVOKE ALL ON TABLE funcionario_status FROM postgres;
861GRANT ALL ON TABLE funcionario_status TO postgres;
862GRANT ALL ON TABLE funcionario_status TO admin_workflow;
863GRANT SELECT ON TABLE funcionario_status TO PUBLIC;
864
865
866--
867-- Name: funcionario_status_funcionario_status_id_seq; Type: ACL; Schema: public; Owner: postgres
868--
869
870REVOKE ALL ON SEQUENCE funcionario_status_funcionario_status_id_seq FROM PUBLIC;
871REVOKE ALL ON SEQUENCE funcionario_status_funcionario_status_id_seq FROM postgres;
872GRANT ALL ON SEQUENCE funcionario_status_funcionario_status_id_seq TO postgres;
873GRANT ALL ON SEQUENCE funcionario_status_funcionario_status_id_seq TO admin_workflow;
874GRANT SELECT ON SEQUENCE funcionario_status_funcionario_status_id_seq TO PUBLIC;
875
876
877--
878-- Name: localidade; Type: ACL; Schema: public; Owner: postgres
879--
880
881REVOKE ALL ON TABLE localidade FROM PUBLIC;
882REVOKE ALL ON TABLE localidade FROM postgres;
883GRANT ALL ON TABLE localidade TO postgres;
884GRANT ALL ON TABLE localidade TO admin_workflow;
885GRANT SELECT ON TABLE localidade TO PUBLIC;
886
887
888--
889-- Name: localidade_localidade_id_seq; Type: ACL; Schema: public; Owner: postgres
890--
891
892REVOKE ALL ON SEQUENCE localidade_localidade_id_seq FROM PUBLIC;
893REVOKE ALL ON SEQUENCE localidade_localidade_id_seq FROM postgres;
894GRANT ALL ON SEQUENCE localidade_localidade_id_seq TO postgres;
895GRANT ALL ON SEQUENCE localidade_localidade_id_seq TO admin_workflow;
896GRANT SELECT ON SEQUENCE localidade_localidade_id_seq TO PUBLIC;
897
898
899--
900-- Name: organizacao; Type: ACL; Schema: public; Owner: postgres
901--
902
903REVOKE ALL ON TABLE organizacao FROM PUBLIC;
904REVOKE ALL ON TABLE organizacao FROM postgres;
905GRANT ALL ON TABLE organizacao TO postgres;
906GRANT ALL ON TABLE organizacao TO admin_workflow;
907GRANT SELECT ON TABLE organizacao TO PUBLIC;
908
909
910--
911-- Name: organizacao_organizacao_id_seq; Type: ACL; Schema: public; Owner: postgres
912--
913
914REVOKE ALL ON SEQUENCE organizacao_organizacao_id_seq FROM PUBLIC;
915REVOKE ALL ON SEQUENCE organizacao_organizacao_id_seq FROM postgres;
916GRANT ALL ON SEQUENCE organizacao_organizacao_id_seq TO postgres;
917GRANT ALL ON SEQUENCE organizacao_organizacao_id_seq TO admin_workflow;
918GRANT SELECT ON SEQUENCE organizacao_organizacao_id_seq TO PUBLIC;
919
920
921--
922-- PostgreSQL database dump complete
923--
924
Note: See TracBrowser for help on using the repository browser.