Commit 8286033b993ef3bebbc240e70700c12727831616
1 parent
390c53a1
Exists in
master
[Redmine #5043]Merge atendimento requisição consumo
Showing
1 changed file
with
54 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
... | ... | @@ -170,3 +170,57 @@ CREATE TABLE alm_rc_at_item_end_aud |
170 | 170 | ); |
171 | 171 | |
172 | 172 | -- ERICK FIM 23/05/2016 |
173 | + | |
174 | +-- Erick INICIO 24/05/2016 | |
175 | +CREATE TABLE alm_rc_atendimentoitemfifo | |
176 | +( | |
177 | + id bigint NOT NULL, | |
178 | + databloqueio date, | |
179 | + datainativo date, | |
180 | + datacriacao timestamp without time zone NOT NULL, | |
181 | + dataedicao timestamp without time zone NOT NULL, | |
182 | + version bigint, | |
183 | + quantidadeutilizada numeric(20,4) NOT NULL, | |
184 | + inativador_id bigint, | |
185 | + autor_id bigint, | |
186 | + editor_id bigint, | |
187 | + organizacao_id bigint, | |
188 | + at_req_consumoitem_id bigint NOT NULL, | |
189 | + materialestoquefifoitem_id bigint, | |
190 | + CONSTRAINT alm_rc_atendimentoitemfifo_pkey PRIMARY KEY (id), | |
191 | + CONSTRAINT fk_182ti3frfvwwapjtm4qkhoyao FOREIGN KEY (inativador_id) | |
192 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
193 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
194 | + CONSTRAINT fk_97ui5rhx7nsr6h8eourfsxct0 FOREIGN KEY (at_req_consumoitem_id) | |
195 | + REFERENCES alm_rc_atendimentoitem (id) MATCH SIMPLE | |
196 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
197 | + CONSTRAINT fk_cvmj6dr7enhmoi7huv9rjf2sp FOREIGN KEY (organizacao_id) | |
198 | + REFERENCES organizacao (id) MATCH SIMPLE | |
199 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
200 | + CONSTRAINT fk_pfax4c9citfm74ok7q8oe7m2l FOREIGN KEY (autor_id) | |
201 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
202 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
203 | + CONSTRAINT fk_r6b6iwwn5nu263ulnugc55o8a FOREIGN KEY (editor_id) | |
204 | + REFERENCES seguranca_usuario (id) MATCH SIMPLE | |
205 | + ON UPDATE NO ACTION ON DELETE NO ACTION, | |
206 | + CONSTRAINT fk_s34cvykt2pw5kmw63ctdod3hi FOREIGN KEY (materialestoquefifoitem_id) | |
207 | + REFERENCES alm_me_fifoitem (id) MATCH SIMPLE | |
208 | + ON UPDATE NO ACTION ON DELETE NO ACTION | |
209 | +); | |
210 | + | |
211 | +CREATE TABLE alm_rc_atitfifo_aud | |
212 | +( | |
213 | + id bigint NOT NULL, | |
214 | + rev integer NOT NULL, | |
215 | + revtype smallint, | |
216 | + databloqueio date, | |
217 | + datainativo date, | |
218 | + datacriacao timestamp without time zone, | |
219 | + dataedicao timestamp without time zone, | |
220 | + quantidadeutilizada numeric(20,4), | |
221 | + autor_id bigint, | |
222 | + editor_id bigint, | |
223 | + at_req_consumoitem_id bigint, | |
224 | + materialestoquefifoitem_id bigint | |
225 | +); | |
226 | +-- Erick FIM 24/05/2016 | ... | ... |