Skip to content

Commit

Permalink
Actualiza
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Feb 17, 2024
1 parent 19e3ae6 commit 91174a1
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 90 deletions.
154 changes: 87 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,70 +105,79 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
actioncable (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
zeitwerk (~> 2.6)
actionmailbox (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8)
actionpack (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activesupport (= 7.0.8)
actionmailer (7.1.3)
actionpack (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activesupport (= 7.1.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8)
actionview (= 7.0.8)
activesupport (= 7.0.8)
rack (~> 2.0, >= 2.2.4)
rails-dom-testing (~> 2.2)
actionpack (7.1.3)
actionview (= 7.1.3)
activesupport (= 7.1.3)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8)
actionpack (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3)
actionpack (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8)
activesupport (= 7.0.8)
actionview (7.1.3)
activesupport (= 7.1.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.8)
activesupport (= 7.0.8)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3)
activesupport (= 7.1.3)
globalid (>= 0.3.6)
activemodel (7.0.8)
activesupport (= 7.0.8)
activerecord (7.0.8)
activemodel (= 7.0.8)
activesupport (= 7.0.8)
activestorage (7.0.8)
actionpack (= 7.0.8)
activejob (= 7.0.8)
activerecord (= 7.0.8)
activesupport (= 7.0.8)
activemodel (7.1.3)
activesupport (= 7.1.3)
activerecord (7.1.3)
activemodel (= 7.1.3)
activesupport (= 7.1.3)
timeout (>= 0.4.0)
activestorage (7.1.3)
actionpack (= 7.1.3)
activejob (= 7.1.3)
activerecord (= 7.1.3)
activesupport (= 7.1.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8)
activesupport (7.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
acts_as_list (1.1.0)
activerecord (>= 4.2)
Expand All @@ -181,7 +190,9 @@ GEM
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.6)
bindex (0.8.1)
bootsnap (1.18.3)
msgpack (~> 1.2)
Expand Down Expand Up @@ -239,6 +250,8 @@ GEM
dotenv-rails (3.0.2)
dotenv (= 3.0.2)
railties (>= 6.1)
drb (2.2.0)
ruby2_keywords
erubi (1.12.0)
execjs (2.9.1)
ferrum (0.14)
Expand Down Expand Up @@ -278,7 +291,6 @@ GEM
net-smtp
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0206)
Expand All @@ -291,6 +303,7 @@ GEM
minitest (>= 5.0)
ruby-progressbar
msgpack (1.7.2)
mutex_m (0.2.0)
net-imap (0.4.10)
date
net-protocol
Expand Down Expand Up @@ -343,22 +356,27 @@ GEM
rack (2.2.8)
rack-cors (2.0.1)
rack (>= 2.0.0)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8)
actioncable (= 7.0.8)
actionmailbox (= 7.0.8)
actionmailer (= 7.0.8)
actionpack (= 7.0.8)
actiontext (= 7.0.8)
actionview (= 7.0.8)
activejob (= 7.0.8)
activemodel (= 7.0.8)
activerecord (= 7.0.8)
activestorage (= 7.0.8)
activesupport (= 7.0.8)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3)
actioncable (= 7.1.3)
actionmailbox (= 7.1.3)
actionmailer (= 7.1.3)
actionpack (= 7.1.3)
actiontext (= 7.1.3)
actionview (= 7.1.3)
activejob (= 7.1.3)
activemodel (= 7.1.3)
activerecord (= 7.1.3)
activestorage (= 7.1.3)
activesupport (= 7.1.3)
bundler (>= 1.15.0)
railties (= 7.0.8)
railties (= 7.1.3)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -378,13 +396,14 @@ GEM
rails-i18n (7.0.8)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.0.8)
actionpack (= 7.0.8)
activesupport (= 7.0.8)
method_source
railties (7.1.3)
actionpack (= 7.1.3)
activesupport (= 7.1.3)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
raindrops (0.20.1)
rake (13.1.0)
Expand Down Expand Up @@ -427,6 +446,7 @@ GEM
ruby-graphviz (1.2.5)
rexml
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sassc (2.4.0)
ffi (~> 1.9)
Expand Down Expand Up @@ -543,9 +563,9 @@ DEPENDENCIES
prawn
prawn-table
prawnto_2
rack
rack (~> 2)
rack-cors
rails (>= 7.0, < 7.1)
rails (>= 7.1, < 7.2)
rails-controller-testing
rails-erd
rails-i18n
Expand Down
53 changes: 30 additions & 23 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
--

-- *not* creating schema, since initdb creates it


--
-- Name: es_co_utf_8; Type: COLLATION; Schema: public; Owner: -
--
Expand Down Expand Up @@ -4825,11 +4832,11 @@ UNION
--

CREATE MATERIALIZED VIEW public.msip_mundep AS
SELECT msip_mundep_sinorden.idlocal,
msip_mundep_sinorden.nombre,
to_tsvector('spanish'::regconfig, public.unaccent(msip_mundep_sinorden.nombre)) AS mundep
SELECT idlocal,
nombre,
to_tsvector('spanish'::regconfig, public.unaccent(nombre)) AS mundep
FROM public.msip_mundep_sinorden
ORDER BY (msip_mundep_sinorden.nombre COLLATE public.es_co_utf_8)
ORDER BY (nombre COLLATE public.es_co_utf_8)
WITH NO DATA;


Expand Down Expand Up @@ -5488,13 +5495,13 @@ ALTER SEQUENCE public.msip_vereda_id_seq OWNED BY public.msip_vereda.id;
--

CREATE MATERIALIZED VIEW public.napellidos AS
SELECT s.apellido,
SELECT apellido,
count(*) AS frec
FROM ( SELECT public.divarr(string_to_array(btrim((msip_persona.apellidos)::text), ' '::text)) AS apellido
FROM public.msip_persona,
public.sivel2_gen_victima
WHERE (sivel2_gen_victima.persona_id = msip_persona.id)) s
GROUP BY s.apellido
GROUP BY apellido
ORDER BY (count(*))
WITH NO DATA;

Expand All @@ -5504,13 +5511,13 @@ CREATE MATERIALIZED VIEW public.napellidos AS
--

CREATE MATERIALIZED VIEW public.nhombres AS
SELECT s.nombre,
SELECT nombre,
count(*) AS frec
FROM ( SELECT public.divarr(string_to_array(btrim((msip_persona.nombres)::text), ' '::text)) AS nombre
FROM public.msip_persona,
public.sivel2_gen_victima
WHERE ((sivel2_gen_victima.persona_id = msip_persona.id) AND (msip_persona.sexo = 'M'::bpchar))) s
GROUP BY s.nombre
GROUP BY nombre
ORDER BY (count(*))
WITH NO DATA;

Expand All @@ -5520,13 +5527,13 @@ CREATE MATERIALIZED VIEW public.nhombres AS
--

CREATE MATERIALIZED VIEW public.nmujeres AS
SELECT s.nombre,
SELECT nombre,
count(*) AS frec
FROM ( SELECT public.divarr(string_to_array(btrim((msip_persona.nombres)::text), ' '::text)) AS nombre
FROM public.msip_persona,
public.sivel2_gen_victima
WHERE ((sivel2_gen_victima.persona_id = msip_persona.id) AND (msip_persona.sexo = 'F'::bpchar))) s
GROUP BY s.nombre
GROUP BY nombre
ORDER BY (count(*))
WITH NO DATA;

Expand All @@ -5536,8 +5543,8 @@ CREATE MATERIALIZED VIEW public.nmujeres AS
--

CREATE MATERIALIZED VIEW public.persona_nomap AS
SELECT msip_persona.id,
upper(btrim(((btrim((msip_persona.nombres)::text) || ' '::text) || btrim((msip_persona.apellidos)::text)))) AS nomap
SELECT id,
upper(btrim(((btrim((nombres)::text) || ' '::text) || btrim((apellidos)::text)))) AS nomap
FROM public.msip_persona
WITH NO DATA;

Expand Down Expand Up @@ -6050,9 +6057,9 @@ CREATE TABLE public.sivel2_gen_presponsable (
--

CREATE VIEW public.sivel2_gen_conscaso1 AS
SELECT caso.id AS caso_id,
caso.fecha,
caso.memo,
SELECT id AS caso_id,
fecha,
memo,
array_to_string(ARRAY( SELECT (((COALESCE(departamento.nombre, ''::character varying))::text || ' / '::text) || (COALESCE(municipio.nombre, ''::character varying))::text)
FROM ((public.msip_ubicacion ubicacion
LEFT JOIN public.msip_departamento departamento ON ((ubicacion.departamento_id = departamento.id)))
Expand Down Expand Up @@ -6080,15 +6087,15 @@ CREATE VIEW public.sivel2_gen_conscaso1 AS
--

CREATE MATERIALIZED VIEW public.sivel2_gen_conscaso AS
SELECT sivel2_gen_conscaso1.caso_id,
sivel2_gen_conscaso1.fecha,
sivel2_gen_conscaso1.memo,
sivel2_gen_conscaso1.ubicaciones,
sivel2_gen_conscaso1.victimas,
sivel2_gen_conscaso1.presponsables,
sivel2_gen_conscaso1.tipificacion,
SELECT caso_id,
fecha,
memo,
ubicaciones,
victimas,
presponsables,
tipificacion,
now() AS ultimo_refresco,
to_tsvector('spanish'::regconfig, public.unaccent(((((((((((((sivel2_gen_conscaso1.caso_id || ' '::text) || replace(((sivel2_gen_conscaso1.fecha)::character varying)::text, '-'::text, ' '::text)) || ' '::text) || sivel2_gen_conscaso1.memo) || ' '::text) || sivel2_gen_conscaso1.ubicaciones) || ' '::text) || sivel2_gen_conscaso1.victimas) || ' '::text) || sivel2_gen_conscaso1.presponsables) || ' '::text) || sivel2_gen_conscaso1.tipificacion))) AS q
to_tsvector('spanish'::regconfig, public.unaccent(((((((((((((caso_id || ' '::text) || replace(((fecha)::character varying)::text, '-'::text, ' '::text)) || ' '::text) || memo) || ' '::text) || ubicaciones) || ' '::text) || victimas) || ' '::text) || presponsables) || ' '::text) || tipificacion))) AS q
FROM public.sivel2_gen_conscaso1
WITH NO DATA;

Expand Down

0 comments on commit 91174a1

Please sign in to comment.