Skip to content

Commit 26e4fc0

Browse files
committed
feat: add Liquibase changelog for renaming filter fields in utm_dashboard
1 parent 2d0e1a2 commit 26e4fc0

3 files changed

Lines changed: 60 additions & 1 deletion

File tree

backend/src/main/resources/config/liquibase/changelog/20251218001_rename_o365_fields.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
66

7-
<changeSet id="20250910040" author="Manuel Abascal">
7+
<changeSet id="20251218001" author="Manuel Abascal">
88

99
<sql dbms="postgresql" splitStatements="true" stripComments="true">
1010
<![CDATA[
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
6+
7+
<changeSet id="20251218002" author="Manuel Abascal">
8+
9+
<sql dbms="postgresql" splitStatements="true" stripComments="true">
10+
<![CDATA[
11+
12+
UPDATE utm_dashboard
13+
SET filters = REPLACE(filters, '"indexPattern":"log-o365-', '"indexPattern":"v11-log-o365-');
14+
15+
UPDATE utm_dashboard
16+
SET filters = REPLACE(filters, '"indexPattern":"alert-', '"indexPattern":"v11-alert-');
17+
18+
UPDATE utm_dashboard
19+
SET filters = REPLACE(filters, '"indexPattern":"log-firewall-meraki-', '"indexPattern":"v11-log-firewall-meraki-');
20+
21+
UPDATE utm_dashboard
22+
SET filters = REPLACE(filters, '"indexPattern":"log-wineventlog-', '"indexPattern":"v11-log-wineventlog-');
23+
24+
UPDATE utm_dashboard
25+
SET filters = REPLACE(filters, '"indexPattern":"log-linux-', '"indexPattern":"v11-log-linux-');
26+
27+
UPDATE utm_dashboard
28+
SET filters = REPLACE(filters, '"indexPattern":"log-cisco-switch-', '"indexPattern":"v11-log-cisco-switch-');
29+
30+
UPDATE utm_dashboard
31+
SET filters = REPLACE(filters, '"indexPattern":"log-firewall-cisco-asa-', '"indexPattern":"v11-log-firewall-cisco-asa-');
32+
33+
UPDATE utm_dashboard
34+
SET filters = REPLACE(filters, '"indexPattern":"log-aws-', '"indexPattern":"v11-log-aws-');
35+
36+
UPDATE utm_dashboard
37+
SET filters = REPLACE(filters, '"field":"ogx.wineventlog.event_data.SubjectUserName.keyword"', '"field":"log.winlogEventDataSubjectUserName"');
38+
39+
UPDATE utm_dashboard
40+
SET filters = REPLACE(filters, '"field":"logx.tenant.keyword"', '"field":"tenantId.keyword"');
41+
42+
UPDATE utm_dashboard
43+
SET filters = REPLACE(filters, '"field":"logx.o365.UserId.keyword"', '"field":"origin.user.keyword"');
44+
45+
UPDATE utm_dashboard
46+
SET filters = REPLACE(filters, '"field":"logx.linux.host.name.keyword"', '"field":"origin.host.keyword"');
47+
48+
UPDATE utm_dashboard
49+
SET filters = REPLACE(filters, '"field":"logx.wineventlog.event_data.TargetUserName.keyword"', '"field":"target.user.keyword"');
50+
51+
UPDATE utm_dashboard
52+
SET filters = REPLACE(filters, '"field":"log.winlogEventDataSubjectUserName"', '"field":"log.winlogEventDataSubjectUserName.keyword"');
53+
54+
]]>
55+
</sql>
56+
</changeSet>
57+
</databaseChangeLog>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,5 +281,7 @@
281281

282282
<include file="/config/liquibase/changelog/20251218001_rename_o365_fields.xml" relativeToChangelogFile="false"/>
283283

284+
<include file="/config/liquibase/changelog/20251218002_rename_filter_fields_dashboard.xml" relativeToChangelogFile="false"/>
285+
284286

285287
</databaseChangeLog>

0 commit comments

Comments
 (0)