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..1109393 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 @@ -19,4 +19,119 @@ ALTER TABLE public.alm_rc_atendimentoitem 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 +-- RONAM FIM 18/05/2016 + + +-- ERICK INICIO 19/05/2016 + + CREATE TABLE alm_rc_atendimento_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, + dataatendimento timestamp without time zone, + numeroatendimento character varying(30), + autor_id bigint, + editor_id bigint, + requisicaoconsumo_id bigint, + CONSTRAINT alm_rc_atendimento_aud_pkey PRIMARY KEY (id, rev), + CONSTRAINT fk_7h0q6ppws69l2ydhge05fat5c FOREIGN KEY (rev) + REFERENCES revinfo (rev) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + +CREATE TABLE alm_requisicaoconsumo_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, + datafinalizacaoatendimento timestamp without time zone, + datarequisicao timestamp without time zone, + numerorequisicao character varying(30), + autor_id bigint, + editor_id bigint, + almoxarifado_id bigint, + centrocusto_id bigint, + tipostatusrequisicao_id bigint, + unidaderequisitante_id bigint, + CONSTRAINT alm_requisicaoconsumo_aud_pkey PRIMARY KEY (id, rev), + CONSTRAINT fk_kgoc7f7kdp4lovhkwcuhikj14 FOREIGN KEY (rev) + REFERENCES revinfo (rev) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + +CREATE TABLE centrocusto_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, + codigo character varying(30), + descricao character varying(255), + autor_id bigint, + editor_id bigint, + centrocustoparent_id bigint, + CONSTRAINT centrocusto_aud_pkey PRIMARY KEY (id, rev), + CONSTRAINT fk_ot4be1e8ga8qnvne6h2lih7hq FOREIGN KEY (rev) + REFERENCES revinfo (rev) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + + +CREATE TABLE alm_rc_item_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, + quantidade numeric(19,2), + quantidadeatendida numeric(19,2), + quantidadedevolvida numeric(19,2), + autor_id bigint, + editor_id bigint, + materialconsumo_id bigint, + requisicaoconsumo_id bigint, + CONSTRAINT alm_rc_item_aud_pkey PRIMARY KEY (id, rev), + CONSTRAINT fk_7agol5t6grqpqno4w0emglvec FOREIGN KEY (rev) + REFERENCES revinfo (rev) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + + +CREATE TABLE alm_rc_atenditem_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, + quantidade numeric(19,2), + autor_id bigint, + editor_id bigint, + atendimentoreqconsumo_id bigint, + material_id bigint, + materiallocalestoque_id bigint, + requisicaoconsumoitem_id bigint, + CONSTRAINT alm_rc_atenditem_aud_pkey PRIMARY KEY (id, rev), + CONSTRAINT fk_hhl6gjpufv2132tv6vijp3gpr FOREIGN KEY (rev) + REFERENCES revinfo (rev) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +); + +-- ERICK FIM 19/05/2016 \ No newline at end of file -- libgit2 0.21.2