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()",
@@ -290,10 +290,10 @@
},
"default_value": [],
"options": [
"Watched_Value1",
"Watched_Value2",
"Watched_Value3",
"Watched_Value4"
"watchedValue1",
"watchedValue2",
"watchedValue3",
"watchedValue4"
],
"localized": [
"name",
@@ -316,15 +316,15 @@
"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 Name</li><li><code>Watched_Value2</code> is Vendor</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is N/A </li></ul>"
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Name</li><li><code>watchedValue2</code> is Vendor</li><li><code>watchedValue3</code> is Interface </li><li><code>watchedValue4</code> is N/A </li></ul>"
},
{
"language_code": "es_es",
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Valor_observado1</code> es Name</li><li><code>Valor_observado2</code> es Proveedor</li><li><code>Valor_observado3</code> es Interfaz </li><li><code>Valor_observado4</code> es N/A </li></ul>"
"string": "Envía una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es Name</li><li><code>watchedValue2</code> es Proveedor</li><li><code>watchedValue3</code> es Interfaz </li><li><code>watchedValue4</code> es N/A </li></ul>"
},
{
"language_code": "de_de",
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>Watched_Value1</code> ist der Namen</li><li><code>Watched_Value2</code> ist der Hersteller</li><li><code>Watched_Value3</code> ist das Interface </li><li><code>Watched_Value4</code> ist nicht in Verwendung </li></ul>"
"string": "Sende eine Benachrichtigung, wenn ein ausgwählter Wert sich ändert. <code>STRG + klicken</code> zum aus-/abwählen. <ul> <li><code>watchedValue1</code> ist der Namen</li><li><code>watchedValue2</code> ist der Hersteller</li><li><code>watchedValue3</code> ist das Interface </li><li><code>watchedValue4</code> ist nicht in Verwendung </li></ul>"
}
]
},
@@ -522,7 +522,7 @@
],
"database_column_definitions": [
{
"column": "Index",
"column": "index",
"css_classes": "col-sm-2",
"show": true,
"type": "none",
@@ -539,7 +539,7 @@
]
},
{
"column": "Object_PrimaryID",
"column": "objectPrimaryId",
"mapped_to_column": "scanMac",
"css_classes": "col-sm-3",
"show": true,
@@ -557,7 +557,7 @@
]
},
{
"column": "Object_SecondaryID",
"column": "objectSecondaryId",
"mapped_to_column": "scanLastIP",
"css_classes": "col-sm-2",
"show": true,
@@ -575,7 +575,7 @@
]
},
{
"column": "Watched_Value1",
"column": "watchedValue1",
"mapped_to_column": "scanName",
"css_classes": "col-sm-2",
"show": true,
@@ -593,7 +593,7 @@
]
},
{
"column": "Watched_Value2",
"column": "watchedValue2",
"mapped_to_column": "scanVendor",
"css_classes": "col-sm-2",
"show": true,
@@ -619,7 +619,7 @@
]
},
{
"column": "Watched_Value3",
"column": "watchedValue3",
"mapped_to_column": "scanLastQuery",
"css_classes": "col-sm-2",
"show": true,
@@ -670,7 +670,7 @@
]
},
{
"column": "DateTimeCreated",
"column": "dateTimeCreated",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -695,7 +695,7 @@
]
},
{
"column": "DateTimeChanged",
"column": "dateTimeChanged",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -720,7 +720,7 @@
]
},
{
"column": "Status",
"column": "status",
"css_classes": "col-sm-1",
"show": true,
"type": "replace",