Refactor event and session column names to camelCase

- Updated test cases to reflect new column names (eve_MAC -> eveMac, eve_DateTime -> eveDateTime, etc.) across various test files.
- Modified SQL table definitions in the database cleanup and migration tests to use camelCase naming conventions.
- Implemented migration tests to ensure legacy column names are correctly renamed to camelCase equivalents.
- Ensured that existing data is preserved during the migration process and that views referencing old column names are dropped before renaming.
- Verified that the migration function is idempotent, allowing for safe re-execution without data loss.
This commit is contained in:
Jokob @NetAlertX
2026-03-16 10:11:22 +00:00
parent 0bb6db155b
commit c7399215ec
109 changed files with 2403 additions and 1967 deletions

View File

@@ -8,7 +8,7 @@
"mapped_to_table": "CurrentScan",
"data_filters": [
{
"compare_column": "Object_PrimaryID",
"compare_column": "objectPrimaryId",
"compare_operator": "==",
"compare_field_id": "txtMacFilter",
"compare_js_template": "'{value}'.toString()",
@@ -380,7 +380,7 @@
"description": [
{
"language_code": "en_us",
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>Watched_Value1</code> is Device Name </li><li><code>Watched_Value2</code> is Parent Node MAC</li><li><code>Watched_Value3</code> is Parent Node Port </li><li><code>Watched_Value4</code> is Parent Node SSID </li></ul>"
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Device Name </li><li><code>watchedValue2</code> is Parent Node MAC</li><li><code>watchedValue3</code> is Parent Node Port </li><li><code>watchedValue4</code> is Parent Node SSID </li></ul>"
}
],
"function": "WATCH",
@@ -392,10 +392,10 @@
}
],
"options": [
"Watched_Value1",
"Watched_Value2",
"Watched_Value3",
"Watched_Value4"
"watchedValue1",
"watchedValue2",
"watchedValue3",
"watchedValue4"
],
"type": {
"dataType": "array",
@@ -413,7 +413,7 @@
"description": [
{
"language_code": "en_us",
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>Watched_ValueN</code> columns changed."
"string": "Send a notification only on these statuses. <code>new</code> means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. <code>watched-changed</code> means that selected <code>watchedValueN</code> columns changed."
}
],
"function": "REPORT_ON",
@@ -517,7 +517,7 @@
],
"database_column_definitions": [
{
"column": "Index",
"column": "index",
"css_classes": "col-sm-2",
"show": true,
"type": "none",
@@ -532,7 +532,7 @@
]
},
{
"column": "Object_PrimaryID",
"column": "objectPrimaryId",
"mapped_to_column": "scanMac",
"css_classes": "col-sm-3",
"show": true,
@@ -548,7 +548,7 @@
]
},
{
"column": "Object_SecondaryID",
"column": "objectSecondaryId",
"mapped_to_column": "scanLastIP",
"css_classes": "col-sm-2",
"show": true,
@@ -564,7 +564,7 @@
]
},
{
"column": "Watched_Value1",
"column": "watchedValue1",
"mapped_to_column": "scanName",
"css_classes": "col-sm-2",
"show": true,
@@ -580,7 +580,7 @@
]
},
{
"column": "Watched_Value2",
"column": "watchedValue2",
"mapped_to_column": "scanParentMAC",
"css_classes": "col-sm-2",
"show": true,
@@ -596,7 +596,7 @@
]
},
{
"column": "Watched_Value3",
"column": "watchedValue3",
"mapped_to_column": "scanParentPort",
"css_classes": "col-sm-2",
"show": true,
@@ -612,7 +612,7 @@
]
},
{
"column": "Watched_Value4",
"column": "watchedValue4",
"mapped_to_column": "scanSSID",
"css_classes": "col-sm-2",
"show": true,
@@ -628,7 +628,7 @@
]
},
{
"column": "Extra",
"column": "extra",
"mapped_to_column": "scanType",
"css_classes": "col-sm-2",
"show": false,
@@ -663,7 +663,7 @@
]
},
{
"column": "DateTimeCreated",
"column": "dateTimeCreated",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -678,7 +678,7 @@
]
},
{
"column": "DateTimeChanged",
"column": "dateTimeChanged",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
@@ -693,7 +693,7 @@
]
},
{
"column": "HelpVal1",
"column": "helpVal1",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -708,7 +708,7 @@
]
},
{
"column": "HelpVal2",
"column": "helpVal2",
"mapped_to_column": "scanSite",
"css_classes": "col-sm-2",
"show": true,
@@ -724,7 +724,7 @@
]
},
{
"column": "HelpVal3",
"column": "helpVal3",
"css_classes": "col-sm-2",
"show": true,
"type": "label",