diff --git a/cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.16.0/01-cit-adm-materiais-v1.16.0-postgres.sql b/cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.16.0/01-cit-adm-materiais-v1.16.0-postgres.sql index 614b15f..97ab044 100644 --- a/cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.16.0/01-cit-adm-materiais-v1.16.0-postgres.sql +++ b/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 ); -- ERICK FIM 23/05/2016 + +-- Erick INICIO 24/05/2016 +CREATE TABLE alm_rc_atendimentoitemfifo +( + id bigint NOT NULL, + databloqueio date, + datainativo date, + datacriacao timestamp without time zone NOT NULL, + dataedicao timestamp without time zone NOT NULL, + version bigint, + quantidadeutilizada numeric(20,4) NOT NULL, + inativador_id bigint, + autor_id bigint, + editor_id bigint, + organizacao_id bigint, + at_req_consumoitem_id bigint NOT NULL, + materialestoquefifoitem_id bigint, + CONSTRAINT alm_rc_atendimentoitemfifo_pkey PRIMARY KEY (id), + CONSTRAINT fk_182ti3frfvwwapjtm4qkhoyao FOREIGN KEY (inativador_id) + REFERENCES seguranca_usuario (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_97ui5rhx7nsr6h8eourfsxct0 FOREIGN KEY (at_req_consumoitem_id) + REFERENCES alm_rc_atendimentoitem (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_cvmj6dr7enhmoi7huv9rjf2sp FOREIGN KEY (organizacao_id) + REFERENCES organizacao (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_pfax4c9citfm74ok7q8oe7m2l FOREIGN KEY (autor_id) + REFERENCES seguranca_usuario (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_r6b6iwwn5nu263ulnugc55o8a FOREIGN KEY (editor_id) + REFERENCES seguranca_usuario (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_s34cvykt2pw5kmw63ctdod3hi FOREIGN KEY (materialestoquefifoitem_id) + REFERENCES alm_me_fifoitem (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + +CREATE TABLE alm_rc_atitfifo_aud +( + id bigint NOT NULL, + rev integer NOT NULL, + revtype smallint, + databloqueio date, + datainativo date, + datacriacao timestamp without time zone, + dataedicao timestamp without time zone, + quantidadeutilizada numeric(20,4), + autor_id bigint, + editor_id bigint, + at_req_consumoitem_id bigint, + materialestoquefifoitem_id bigint +); +-- Erick FIM 24/05/2016 -- libgit2 0.21.2