Skip to content

Commit a2e52de

Browse files
committed
feat(vmware-visualizations): normalize field names in VMware visualizations
1 parent cafc3a1 commit a2e52de

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<databaseChangeLog
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
6+
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
7+
8+
<changeSet id="20260213002" author="Manuel Abascal">
9+
10+
<sql dbms="postgresql" splitStatements="true" stripComments="true">
11+
<![CDATA[
12+
13+
------------------------------------------------------------------
14+
-- Normalize process.keyword → log.process.keyword (SAFE)
15+
-------------------------------------------------------------------
16+
UPDATE utm_visualization
17+
SET filters = REPLACE(filters,
18+
'"field":"process.keyword"',
19+
'"field":"log.process.keyword"')
20+
WHERE filters LIKE '%"field":"process.keyword"%';
21+
22+
UPDATE utm_visualization
23+
SET aggregation = REPLACE(aggregation,
24+
'"field":"process.keyword"',
25+
'"field":"log.process.keyword"')
26+
WHERE aggregation LIKE '%"field":"process.keyword"%';
27+
28+
29+
------------------------------------------------------------------
30+
-- Normalize level.keyword → log.level.keyword (SAFE)
31+
-------------------------------------------------------------------
32+
UPDATE utm_visualization
33+
SET filters = REPLACE(filters,
34+
'"field":"level.keyword"',
35+
'"field":"log.level.keyword"')
36+
WHERE filters LIKE '%"field":"level.keyword"%';
37+
38+
UPDATE utm_visualization
39+
SET aggregation = REPLACE(aggregation,
40+
'"field":"level.keyword"',
41+
'"field":"log.level.keyword"')
42+
WHERE aggregation LIKE '%"field":"level.keyword"%';
43+
44+
]]>
45+
</sql>
46+
47+
</changeSet>
48+
49+
50+
51+
</databaseChangeLog>

backend/src/main/resources/config/liquibase/master.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@
427427

428428
<include file="/config/liquibase/changelog/20260213001_update_bit_defender_visualizations.xml" relativeToChangelogFile="false"/>
429429

430+
<include file="/config/liquibase/changelog/20260213002_update_vmware_visualizations.xml" relativeToChangelogFile="false"/>
431+
430432

431433

432434
</databaseChangeLog>

0 commit comments

Comments
 (0)