Commit f60d808fb6dd20fc5d7ba8c660f35697e9adcaf1

Authored by erick.sato
1 parent 152f7b64
Exists in master

[Redmine #5004]Auditoria atendimento de requisiçaõ de consumo

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
19 19 REFERENCES public.alm_me_localestoque (id) MATCH SIMPLE
20 20 ON UPDATE NO ACTION ON DELETE NO ACTION;
21 21  
22   --- RONAM FIM 18/05/2016
23 22 \ No newline at end of file
  23 +-- RONAM FIM 18/05/2016
  24 +
  25 +
  26 +-- ERICK INICIO 19/05/2016
  27 +
  28 + CREATE TABLE alm_rc_atendimento_aud
  29 +(
  30 + id bigint NOT NULL,
  31 + rev integer NOT NULL,
  32 + revtype smallint,
  33 + databloqueio date,
  34 + datainativo date,
  35 + datacriacao timestamp without time zone,
  36 + dataedicao timestamp without time zone,
  37 + dataatendimento timestamp without time zone,
  38 + numeroatendimento character varying(30),
  39 + autor_id bigint,
  40 + editor_id bigint,
  41 + requisicaoconsumo_id bigint,
  42 + CONSTRAINT alm_rc_atendimento_aud_pkey PRIMARY KEY (id, rev),
  43 + CONSTRAINT fk_7h0q6ppws69l2ydhge05fat5c FOREIGN KEY (rev)
  44 + REFERENCES revinfo (rev) MATCH SIMPLE
  45 + ON UPDATE NO ACTION ON DELETE NO ACTION
  46 +);
  47 +
  48 +CREATE TABLE alm_requisicaoconsumo_aud
  49 +(
  50 + id bigint NOT NULL,
  51 + rev integer NOT NULL,
  52 + revtype smallint,
  53 + databloqueio date,
  54 + datainativo date,
  55 + datacriacao timestamp without time zone,
  56 + dataedicao timestamp without time zone,
  57 + datafinalizacaoatendimento timestamp without time zone,
  58 + datarequisicao timestamp without time zone,
  59 + numerorequisicao character varying(30),
  60 + autor_id bigint,
  61 + editor_id bigint,
  62 + almoxarifado_id bigint,
  63 + centrocusto_id bigint,
  64 + tipostatusrequisicao_id bigint,
  65 + unidaderequisitante_id bigint,
  66 + CONSTRAINT alm_requisicaoconsumo_aud_pkey PRIMARY KEY (id, rev),
  67 + CONSTRAINT fk_kgoc7f7kdp4lovhkwcuhikj14 FOREIGN KEY (rev)
  68 + REFERENCES revinfo (rev) MATCH SIMPLE
  69 + ON UPDATE NO ACTION ON DELETE NO ACTION
  70 +);
  71 +
  72 +CREATE TABLE centrocusto_aud
  73 +(
  74 + id bigint NOT NULL,
  75 + rev integer NOT NULL,
  76 + revtype smallint,
  77 + databloqueio date,
  78 + datainativo date,
  79 + datacriacao timestamp without time zone,
  80 + dataedicao timestamp without time zone,
  81 + codigo character varying(30),
  82 + descricao character varying(255),
  83 + autor_id bigint,
  84 + editor_id bigint,
  85 + centrocustoparent_id bigint,
  86 + CONSTRAINT centrocusto_aud_pkey PRIMARY KEY (id, rev),
  87 + CONSTRAINT fk_ot4be1e8ga8qnvne6h2lih7hq FOREIGN KEY (rev)
  88 + REFERENCES revinfo (rev) MATCH SIMPLE
  89 + ON UPDATE NO ACTION ON DELETE NO ACTION
  90 +);
  91 +
  92 +
  93 +CREATE TABLE alm_rc_item_aud
  94 +(
  95 + id bigint NOT NULL,
  96 + rev integer NOT NULL,
  97 + revtype smallint,
  98 + databloqueio date,
  99 + datainativo date,
  100 + datacriacao timestamp without time zone,
  101 + dataedicao timestamp without time zone,
  102 + quantidade numeric(19,2),
  103 + quantidadeatendida numeric(19,2),
  104 + quantidadedevolvida numeric(19,2),
  105 + autor_id bigint,
  106 + editor_id bigint,
  107 + materialconsumo_id bigint,
  108 + requisicaoconsumo_id bigint,
  109 + CONSTRAINT alm_rc_item_aud_pkey PRIMARY KEY (id, rev),
  110 + CONSTRAINT fk_7agol5t6grqpqno4w0emglvec FOREIGN KEY (rev)
  111 + REFERENCES revinfo (rev) MATCH SIMPLE
  112 + ON UPDATE NO ACTION ON DELETE NO ACTION
  113 +);
  114 +
  115 +
  116 +CREATE TABLE alm_rc_atenditem_aud
  117 +(
  118 + id bigint NOT NULL,
  119 + rev integer NOT NULL,
  120 + revtype smallint,
  121 + databloqueio date,
  122 + datainativo date,
  123 + datacriacao timestamp without time zone,
  124 + dataedicao timestamp without time zone,
  125 + quantidade numeric(19,2),
  126 + autor_id bigint,
  127 + editor_id bigint,
  128 + atendimentoreqconsumo_id bigint,
  129 + material_id bigint,
  130 + materiallocalestoque_id bigint,
  131 + requisicaoconsumoitem_id bigint,
  132 + CONSTRAINT alm_rc_atenditem_aud_pkey PRIMARY KEY (id, rev),
  133 + CONSTRAINT fk_hhl6gjpufv2132tv6vijp3gpr FOREIGN KEY (rev)
  134 + REFERENCES revinfo (rev) MATCH SIMPLE
  135 + ON UPDATE NO ACTION ON DELETE NO ACTION
  136 +);
  137 +
  138 +-- ERICK FIM 19/05/2016
24 139 \ No newline at end of file
... ...