Skip to content

Commit

Permalink
Actualiza
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Dec 8, 2023
1 parent fa6a04f commit 95c947c
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 23 deletions.
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,19 @@ gem "will_paginate" # Listados en páginas
# lógico y no alfabetico como las gemas anteriores)

gem "msip", # Motor generico
git: "https://gitlab.com/pasosdeJesus/msip.git", branch: "renclase"
git: "https://gitlab.com/pasosdeJesus/msip.git", branch: "main"
#path: "../msip"

gem "mr519_gen", # Motor de gestion de formularios y encuestas
git: "https://gitlab.com/pasosdeJesus/mr519_gen.git", branch: "renclase"
git: "https://gitlab.com/pasosdeJesus/mr519_gen.git", branch: "main"
#path: "../mr519_gen"

gem "heb412_gen", # Motor de nube y llenado de plantillas
git: "https://gitlab.com/pasosdeJesus/heb412_gen.git", branch: "renclase"
git: "https://gitlab.com/pasosdeJesus/heb412_gen.git", branch: "main"
#path: "../heb412_gen"

gem "cor1440_gen", # Motor Cor1440_gen
git: "https://gitlab.com/pasosdeJesus/cor1440_gen.git", branch: "renclase"
git: "https://gitlab.com/pasosdeJesus/cor1440_gen.git", branch: "main"
#path: "../cor1440_gen"


Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/cor1440_gen.git
revision: 160ca8a13316ff1bd466e2b230004343623bf29b
branch: renclase
revision: 7f1a427cbfadd652daf613ce04e180bd32b3031a
branch: main
specs:
cor1440_gen (2.2.0.beta4)
devise
Expand All @@ -31,8 +31,8 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/heb412_gen.git
revision: a044ff731677281d6c5f85d2d1e5a812fe330e28
branch: renclase
revision: d16368180b147c367b273cfe39aa14135c79caee
branch: main
specs:
heb412_gen (2.2.0.beta4)
mr519_gen
Expand All @@ -42,17 +42,17 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/mr519_gen.git
revision: 2ba047bdc09de9e808cc66f1f77e4f7add3c6b08
branch: renclase
revision: 83d881fe06ce88ff6dd8454346659d7a4baab651
branch: main
specs:
mr519_gen (2.2.0.beta4)
msip
rails

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: 49840ef8e91936b18f8842ec47c374e7a18d8563
branch: renclase
revision: b6b6b67bbad7571843b1f5d9838e4a3cfadd176a
branch: main
specs:
msip (2.2.0.beta4)
cancancan (~> 3)
Expand Down Expand Up @@ -210,7 +210,7 @@ GEM
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.9.1)
irb (1.10.1)
rdoc
reline (>= 0.3.8)
jbuilder (2.11.5)
Expand All @@ -233,12 +233,12 @@ GEM
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mime-types-data (3.2023.1205)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
msgpack (1.7.2)
net-imap (0.4.5)
net-imap (0.4.7)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -247,7 +247,7 @@ GEM
timeout
net-smtp (0.4.0)
net-protocol
nio4r (2.6.1)
nio4r (2.7.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand Down Expand Up @@ -314,11 +314,11 @@ GEM
zeitwerk (~> 2.5)
raindrops (0.20.1)
rake (13.1.0)
rdoc (6.6.0)
rdoc (6.6.1)
psych (>= 4.0.0)
redcarpet (3.6.0)
regexp_parser (2.8.2)
reline (0.4.0)
regexp_parser (2.8.3)
reline (0.4.1)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
Expand Down Expand Up @@ -356,7 +356,7 @@ GEM
sprockets (>= 3.0.0)
stimulus-rails (1.3.0)
railties (>= 6.0.0)
stringio (3.0.9)
stringio (3.1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (1.3.0)
Expand Down
184 changes: 181 additions & 3 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,94 @@ CREATE FUNCTION public.msip_eliminar_familiar_inverso() RETURNS trigger
$$;


--
-- Name: msip_nombre_vereda(); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_nombre_vereda() RETURNS character varying
LANGUAGE sql
AS $$
SELECT 'Vereda '
$$;


--
-- Name: msip_ubicacionpre_dpa_nomenclatura(character varying, character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_ubicacionpre_dpa_nomenclatura(pais character varying, departamento character varying, municipio character varying, vereda character varying, centropoblado character varying) RETURNS text[]
LANGUAGE sql
AS $$
SELECT CASE
WHEN pais IS NULL OR pais = '' THEN
array[NULL, NULL]
WHEN departamento IS NULL OR departamento = '' THEN
array[pais, NULL]
WHEN municipio IS NULL OR municipio = '' THEN
array[departamento || ' / ' || pais, departamento]
WHEN (vereda IS NULL OR vereda = '') AND
(centropoblado IS NULL OR centropoblado = '') THEN
array[
municipio || ' / ' || departamento || ' / ' || pais,
municipio || ' / ' || departamento ]
WHEN vereda IS NOT NULL THEN
array[
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' || departamento || ' / ' || pais,
msip_nombre_vereda() || vereda || ' / ' ||
municipio || ' / ' || departamento ]
ELSE
array[
centropoblado || ' / ' ||
municipio || ' / ' || departamento || ' / ' || pais,
centropoblado || ' / ' ||
municipio || ' / ' || departamento ]
END
$$;


--
-- Name: msip_ubicacionpre_id_rtablabasica(); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_ubicacionpre_id_rtablabasica() RETURNS integer
LANGUAGE sql
AS $$
SELECT max(id+1) FROM msip_ubicacionpre WHERE
(id+1) NOT IN (SELECT id FROM msip_ubicacionpre) AND
id<10000000
$$;


--
-- Name: msip_ubicacionpre_nomenclatura(character varying, character varying, character varying, character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.msip_ubicacionpre_nomenclatura(pais character varying, departamento character varying, municipio character varying, vereda character varying, centropoblado character varying, lugar character varying, sitio character varying) RETURNS text[]
LANGUAGE sql
AS $$
SELECT CASE
WHEN (lugar IS NULL OR lugar = '') THEN
msip_ubicacionpre_dpa_nomenclatura(pais, departamento,
municipio, vereda, centropoblado)
WHEN (sitio IS NULL OR sitio= '') THEN
array[lugar || ' / ' ||
(msip_ubicacionpre_dpa_nomenclatura(pais, departamento,
municipio, vereda, centropoblado))[0],
lugar || ' / ' ||
(msip_ubicacionpre_dpa_nomenclatura(pais, departamento,
municipio, vereda, centropoblado))[1] ]
ELSE
array[sitio || ' / ' || lugar || ' / ' ||
(msip_ubicacionpre_dpa_nomenclatura(pais, departamento,
municipio, vereda, centropoblado))[0],
sitio || ' / ' || lugar || ' / ' ||
(msip_ubicacionpre_dpa_nomenclatura(pais, departamento,
municipio, vereda, centropoblado))[1] ]
END
$$;


--
-- Name: soundexesp(text); Type: FUNCTION; Schema: public; Owner: -
--
Expand Down Expand Up @@ -3757,7 +3845,7 @@ CREATE TABLE public.msip_ubicacion (
CREATE TABLE public.msip_ubicacionpre (
id bigint NOT NULL,
nombre character varying(2000) NOT NULL COLLATE public.es_co_utf_8,
pais_id integer,
pais_id integer NOT NULL,
departamento_id integer,
municipio_id integer,
centropoblado_id integer,
Expand All @@ -3768,7 +3856,11 @@ CREATE TABLE public.msip_ubicacionpre (
longitud double precision,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
nombre_sin_pais character varying(500)
nombre_sin_pais character varying(500),
vereda_id integer,
observaciones character varying(5000),
fechacreacion date DEFAULT now() NOT NULL,
fechadeshabilitacion date
);


Expand Down Expand Up @@ -4941,6 +5033,14 @@ ALTER TABLE ONLY public.msip_centropoblado
ADD CONSTRAINT msip_centropoblado_id_uniq UNIQUE (id);


--
-- Name: msip_centropoblado msip_centropoblado_municipio_id_id_unico; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_centropoblado
ADD CONSTRAINT msip_centropoblado_municipio_id_id_unico UNIQUE (municipio_id, id);


--
-- Name: msip_centropoblado msip_centropoblado_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -4973,6 +5073,14 @@ ALTER TABLE ONLY public.msip_departamento
ADD CONSTRAINT msip_departamento_id_pais_id_deplocal_unico UNIQUE (pais_id, deplocal_cod);


--
-- Name: msip_departamento msip_departamento_pais_id_id_unico; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_departamento
ADD CONSTRAINT msip_departamento_pais_id_id_unico UNIQUE (pais_id, id);


--
-- Name: msip_departamento msip_departamento_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -5029,6 +5137,14 @@ ALTER TABLE ONLY public.msip_grupoper
ADD CONSTRAINT msip_grupoper_pkey PRIMARY KEY (id);


--
-- Name: msip_municipio msip_municipio_departamento_id_id_unico; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_municipio
ADD CONSTRAINT msip_municipio_departamento_id_id_unico UNIQUE (departamento_id, id);


--
-- Name: msip_municipio_histvigencia msip_municipio_histvigencia_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -5237,6 +5353,14 @@ ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT msip_ubicacionpre_pkey PRIMARY KEY (id);


--
-- Name: msip_vereda msip_vereda_municipio_id_id_unico; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_vereda
ADD CONSTRAINT msip_vereda_municipio_id_id_unico UNIQUE (municipio_id, id);


--
-- Name: msip_vereda msip_vereda_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -5423,6 +5547,13 @@ CREATE INDEX index_msip_ubicacion_on_municipio_id ON public.msip_ubicacion USING
CREATE INDEX index_msip_ubicacion_on_pais_id ON public.msip_ubicacion USING btree (pais_id);


--
-- Name: index_msip_ubicacionpre_on_vereda_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_msip_ubicacionpre_on_vereda_id ON public.msip_ubicacionpre USING btree (vereda_id);


--
-- Name: index_sivel2_gen_actividad_on_rangoedadac_id; Type: INDEX; Schema: public; Owner: -
--
Expand Down Expand Up @@ -5967,6 +6098,14 @@ ALTER TABLE ONLY public.mr519_gen_encuestapersona
ADD CONSTRAINT fk_rails_54b3e0ed5c FOREIGN KEY (persona_id) REFERENCES public.msip_persona(id);


--
-- Name: msip_ubicacionpre fk_rails_558c98f353; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_rails_558c98f353 FOREIGN KEY (vereda_id) REFERENCES public.msip_vereda(id);


--
-- Name: msip_etiqueta_municipio fk_rails_5672729520; Type: FK CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -6615,6 +6754,38 @@ ALTER TABLE ONLY public.msip_solicitud
ADD CONSTRAINT fk_rails_ffa31a0de6 FOREIGN KEY (estadosol_id) REFERENCES public.msip_estadosol(id);


--
-- Name: msip_ubicacionpre fk_ubicacionpre_departamento_municipio; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_ubicacionpre_departamento_municipio FOREIGN KEY (departamento_id, municipio_id) REFERENCES public.msip_municipio(departamento_id, id);


--
-- Name: msip_ubicacionpre fk_ubicacionpre_municipio_centropoblado; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_ubicacionpre_municipio_centropoblado FOREIGN KEY (municipio_id, centropoblado_id) REFERENCES public.msip_centropoblado(municipio_id, id);


--
-- Name: msip_ubicacionpre fk_ubicacionpre_municipio_vereda; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_ubicacionpre_municipio_vereda FOREIGN KEY (municipio_id, vereda_id) REFERENCES public.msip_vereda(municipio_id, id);


--
-- Name: msip_ubicacionpre fk_ubicacionpre_pais_departamento; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.msip_ubicacionpre
ADD CONSTRAINT fk_ubicacionpre_pais_departamento FOREIGN KEY (pais_id, departamento_id) REFERENCES public.msip_departamento(pais_id, id);


--
-- Name: cor1440_gen_proyectofinanciero lf_proyectofinanciero_responsable; Type: FK CONSTRAINT; Schema: public; Owner: -
--
Expand Down Expand Up @@ -7150,6 +7321,13 @@ INSERT INTO "schema_migrations" (version) VALUES
('20231007095930'),
('20231120094041'),
('20231120175125'),
('20231121203443');
('20231121203443'),
('20231124200056'),
('20231125152802'),
('20231125152810'),
('20231125230000'),
('20231205202418'),
('20231205205549'),
('20231205205600');


0 comments on commit 95c947c

Please sign in to comment.