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 1231284..fdb3919 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 @@ -11,12 +11,41 @@ VALUES (NEXTVAL('hibernate_sequence'), LOCALTIMESTAMP, LOCALTIMESTAMP, NULL, 0, 'tipoStatusRequisicao', 'Finalizada', 'FINALIZADA', 5, false); -- ERICK FIM 16/05/2016 --- RONAM INICIO 18/05/2016 +-- RONAN INICIO 18/05/2016 -ALTER TABLE public.alm_rc_atendimentoitem ADD COLUMN materiallocalestoque_id bigint; -ALTER TABLE public.alm_rc_atendimentoitem +ALTER TABLE alm_rc_atendimentoitem ADD COLUMN materiallocalestoque_id bigint; +ALTER TABLE alm_rc_atendimentoitem ADD CONSTRAINT fk_hx3srtvuubkwfds6s3bckj3yp FOREIGN KEY (materiallocalestoque_id) REFERENCES public.alm_me_localestoque (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION; --- RONAM FIM 18/05/2016 \ No newline at end of file +-- RONAN FIM 18/05/2016 + +-- RONAN INICIO 19/05/2016 + +alter table alm_rc_atendimentoitem drop column quantidade; +alter table alm_rc_atendimentoitem drop constraint fk_hx3srtvuubkwfds6s3bckj3yp; +alter table alm_rc_atendimentoitem drop column materiallocalestoque_id; + +CREATE TABLE alm_rc_at_item_endereco +( + id bigint NOT NULL, + databloqueio date, + datainativo date, + quantidade numeric(19,2), + inativador_id bigint, + at_req_consumoitem_id bigint NOT NULL, + materiallocalestoque_id bigint NOT NULL, + CONSTRAINT alm_rc_at_item_endereco_pkey PRIMARY KEY (id), + CONSTRAINT fk_7ep45inuirh29oxc70t085n7t FOREIGN KEY (at_req_consumoitem_id) + REFERENCES public.alm_rc_atendimentoitem (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_9tdi5v43fn5qtt3n4wn2c9ma4 FOREIGN KEY (materiallocalestoque_id) + REFERENCES public.alm_me_localestoque (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION, + CONSTRAINT fk_g385pn6ltxma9nmkq8sohtkw2 FOREIGN KEY (inativador_id) + REFERENCES public.seguranca_usuario (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +) + +-- RONAN FIM 19/05/2016 \ No newline at end of file -- libgit2 0.21.2