Commit 659ba63331c8c8692902dfa83fb7dc78f855ef79

Authored by erick.sato
1 parent c6a76141
Exists in master

[Redmine Atendimento #4740]Script endereço estoque

cit-adm-materiais-api/src/main/resources/scripts-bd/postgres/v1.15.0/01-cit-adm-materiais-v1.15.0-postgres.sql
... ... @@ -225,13 +225,22 @@ CREATE TABLE alm_es_enderecoestoque
225 225 datacriacao timestamp without time zone NOT NULL,
226 226 dataedicao timestamp without time zone NOT NULL,
227 227 version bigint,
  228 + acomodamaterial boolean,
  229 + codigo character varying(30) NOT NULL,
  230 + descricao character varying(400) NOT NULL,
  231 + endertodomaterial boolean,
  232 + sigla character varying(30),
228 233 inativador_id bigint,
229 234 autor_id bigint,
230 235 editor_id bigint,
231 236 organizacao_id bigint,
  237 + endeestoqsuperior_id bigint,
232 238 estoque_id bigint,
233 239 estoqueinativo_id bigint,
234 240 CONSTRAINT alm_es_enderecoestoque_pkey PRIMARY KEY (id),
  241 + CONSTRAINT fk_6m42m9ufi8e091yhslto1xynw FOREIGN KEY (endeestoqsuperior_id)
  242 + REFERENCES alm_es_enderecoestoque (id) MATCH SIMPLE
  243 + ON UPDATE NO ACTION ON DELETE NO ACTION,
235 244 CONSTRAINT fk_7cque00jpsdib3vrm26xkusdd FOREIGN KEY (inativador_id)
236 245 REFERENCES seguranca_usuario (id) MATCH SIMPLE
237 246 ON UPDATE NO ACTION ON DELETE NO ACTION,
... ... @@ -249,7 +258,8 @@ CREATE TABLE alm_es_enderecoestoque
249 258 ON UPDATE NO ACTION ON DELETE NO ACTION,
250 259 CONSTRAINT fk_npvxsokt3fcl4rl1v3ik2ky2k FOREIGN KEY (organizacao_id)
251 260 REFERENCES organizacao (id) MATCH SIMPLE
252   - ON UPDATE NO ACTION ON DELETE NO ACTION
  261 + ON UPDATE NO ACTION ON DELETE NO ACTION,
  262 + CONSTRAINT uk_3tn2a36j7pjrt90mvi3o06drp UNIQUE (codigo)
253 263 );
254 264  
255 265 CREATE TABLE alm_es_enderecoestoque_aud
... ... @@ -261,8 +271,14 @@ CREATE TABLE alm_es_enderecoestoque_aud
261 271 datainativo date,
262 272 datacriacao timestamp without time zone,
263 273 dataedicao timestamp without time zone,
  274 + acomodamaterial boolean,
  275 + codigo character varying(30),
  276 + descricao character varying(400),
  277 + endertodomaterial boolean,
  278 + sigla character varying(30),
264 279 autor_id bigint,
265 280 editor_id bigint,
  281 + endeestoqsuperior_id bigint,
266 282 estoque_id bigint,
267 283 estoqueinativo_id bigint,
268 284 CONSTRAINT alm_es_enderecoestoque_aud_pkey PRIMARY KEY (id, rev)
... ...