Commit 2e9d49381cbb0177090bf01bb786a8f0f7132cd6
Exists in
master
Merge branch 'tarefa-3822' of http://ferramentasgo.centralit.com.br:8080/scm/git…
…/cit-grp-adm-materiais into tarefa-3822 # Conflicts: # cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.16.0/01-cit-adm-materiais-v1.16.0-postgres.sql
Showing
1 changed file
with
126 additions
and
0 deletions
Show diff stats
cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.16.0/01-cit-adm-materiais-v1.16.0-postgres.sql
@@ -20,6 +20,132 @@ ALTER TABLE alm_rc_atendimentoitem | @@ -20,6 +20,132 @@ ALTER TABLE alm_rc_atendimentoitem | ||
20 | ON UPDATE NO ACTION ON DELETE NO ACTION; | 20 | ON UPDATE NO ACTION ON DELETE NO ACTION; |
21 | 21 | ||
22 | -- RONAN FIM 18/05/2016 | 22 | -- RONAN FIM 18/05/2016 |
23 | + | ||
24 | + | ||
25 | +-- ERICK INICIO 19/05/2016 | ||
26 | + | ||
27 | + CREATE TABLE alm_rc_atendimento_aud | ||
28 | +( | ||
29 | + id bigint NOT NULL, | ||
30 | + rev integer NOT NULL, | ||
31 | + revtype smallint, | ||
32 | + databloqueio date, | ||
33 | + datainativo date, | ||
34 | + datacriacao timestamp without time zone, | ||
35 | + dataedicao timestamp without time zone, | ||
36 | + dataatendimento timestamp without time zone, | ||
37 | + numeroatendimento character varying(30), | ||
38 | + autor_id bigint, | ||
39 | + editor_id bigint, | ||
40 | + requisicaoconsumo_id bigint, | ||
41 | + CONSTRAINT alm_rc_atendimento_aud_pkey PRIMARY KEY (id, rev), | ||
42 | + CONSTRAINT fk_7h0q6ppws69l2ydhge05fat5c FOREIGN KEY (rev) | ||
43 | + REFERENCES revinfo (rev) MATCH SIMPLE | ||
44 | + ON UPDATE NO ACTION ON DELETE NO ACTION | ||
45 | +); | ||
46 | + | ||
47 | +CREATE TABLE alm_requisicaoconsumo_aud | ||
48 | +( | ||
49 | + id bigint NOT NULL, | ||
50 | + rev integer NOT NULL, | ||
51 | + revtype smallint, | ||
52 | + databloqueio date, | ||
53 | + datainativo date, | ||
54 | + datacriacao timestamp without time zone, | ||
55 | + dataedicao timestamp without time zone, | ||
56 | + datafinalizacaoatendimento timestamp without time zone, | ||
57 | + datarequisicao timestamp without time zone, | ||
58 | + numerorequisicao character varying(30), | ||
59 | + autor_id bigint, | ||
60 | + editor_id bigint, | ||
61 | + almoxarifado_id bigint, | ||
62 | + centrocusto_id bigint, | ||
63 | + tipostatusrequisicao_id bigint, | ||
64 | + unidaderequisitante_id bigint, | ||
65 | + CONSTRAINT alm_requisicaoconsumo_aud_pkey PRIMARY KEY (id, rev), | ||
66 | + CONSTRAINT fk_kgoc7f7kdp4lovhkwcuhikj14 FOREIGN KEY (rev) | ||
67 | + REFERENCES revinfo (rev) MATCH SIMPLE | ||
68 | + ON UPDATE NO ACTION ON DELETE NO ACTION | ||
69 | +); | ||
70 | + | ||
71 | +CREATE TABLE centrocusto_aud | ||
72 | +( | ||
73 | + id bigint NOT NULL, | ||
74 | + rev integer NOT NULL, | ||
75 | + revtype smallint, | ||
76 | + databloqueio date, | ||
77 | + datainativo date, | ||
78 | + datacriacao timestamp without time zone, | ||
79 | + dataedicao timestamp without time zone, | ||
80 | + codigo character varying(30), | ||
81 | + descricao character varying(255), | ||
82 | + autor_id bigint, | ||
83 | + editor_id bigint, | ||
84 | + centrocustoparent_id bigint, | ||
85 | + CONSTRAINT centrocusto_aud_pkey PRIMARY KEY (id, rev), | ||
86 | + CONSTRAINT fk_ot4be1e8ga8qnvne6h2lih7hq FOREIGN KEY (rev) | ||
87 | + REFERENCES revinfo (rev) MATCH SIMPLE | ||
88 | + ON UPDATE NO ACTION ON DELETE NO ACTION | ||
89 | +); | ||
90 | + | ||
91 | + | ||
92 | +CREATE TABLE alm_rc_item_aud | ||
93 | +( | ||
94 | + id bigint NOT NULL, | ||
95 | + rev integer NOT NULL, | ||
96 | + revtype smallint, | ||
97 | + databloqueio date, | ||
98 | + datainativo date, | ||
99 | + datacriacao timestamp without time zone, | ||
100 | + dataedicao timestamp without time zone, | ||
101 | + quantidade numeric(19,2), | ||
102 | + quantidadeatendida numeric(19,2), | ||
103 | + quantidadedevolvida numeric(19,2), | ||
104 | + autor_id bigint, | ||
105 | + editor_id bigint, | ||
106 | + materialconsumo_id bigint, | ||
107 | + requisicaoconsumo_id bigint, | ||
108 | + CONSTRAINT alm_rc_item_aud_pkey PRIMARY KEY (id, rev), | ||
109 | + CONSTRAINT fk_7agol5t6grqpqno4w0emglvec FOREIGN KEY (rev) | ||
110 | + REFERENCES revinfo (rev) MATCH SIMPLE | ||
111 | + ON UPDATE NO ACTION ON DELETE NO ACTION | ||
112 | +); | ||
113 | + | ||
114 | + | ||
115 | +CREATE TABLE alm_rc_atenditem_aud | ||
116 | +( | ||
117 | + id bigint NOT NULL, | ||
118 | + rev integer NOT NULL, | ||
119 | + revtype smallint, | ||
120 | + databloqueio date, | ||
121 | + datainativo date, | ||
122 | + datacriacao timestamp without time zone, | ||
123 | + dataedicao timestamp without time zone, | ||
124 | + quantidade numeric(19,2), | ||
125 | + autor_id bigint, | ||
126 | + editor_id bigint, | ||
127 | + atendimentoreqconsumo_id bigint, | ||
128 | + material_id bigint, | ||
129 | + materiallocalestoque_id bigint, | ||
130 | + requisicaoconsumoitem_id bigint, | ||
131 | + CONSTRAINT alm_rc_atenditem_aud_pkey PRIMARY KEY (id, rev), | ||
132 | + CONSTRAINT fk_hhl6gjpufv2132tv6vijp3gpr FOREIGN KEY (rev) | ||
133 | + REFERENCES revinfo (rev) MATCH SIMPLE | ||
134 | + ON UPDATE NO ACTION ON DELETE NO ACTION | ||
135 | +); | ||
136 | + | ||
137 | +-- ERICK FIM 19/05/2016 | ||
138 | + | ||
139 | +-- ERICK INICIO 20/05/2016 | ||
140 | +ALTER TABLE alm_requisicaoconsumo ADD COLUMN emAtendimento BOOLEAN DEFAULT FALSE; | ||
141 | +ALTER TABLE alm_requisicaoconsumo_aud ADD COLUMN emAtendimento BOOLEAN; | ||
142 | + | ||
143 | +ALTER TABLE alm_requisicaoconsumo ADD COLUMN atendente_id BIGINT; | ||
144 | +ALTER TABLE alm_requisicaoconsumo_aud ADD COLUMN atendente_id BIGINT; | ||
145 | + | ||
146 | +ALTER TABLE ONLY alm_requisicaoconsumo | ||
147 | +ADD CONSTRAINT fk_req_atendente FOREIGN KEY (atendente_id) REFERENCES seguranca_usuario(id); | ||
148 | +-- ERICK FIM 20/05/2016 | ||
23 | 149 | ||
24 | -- RONAN INICIO 19/05/2016 | 150 | -- RONAN INICIO 19/05/2016 |
25 | 151 |