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

@@ -40,7 +40,7 @@
"params": [],
"database_column_definitions": [
{
"column": "Index",
"column": "index",
"css_classes": "col-sm-2",
"show": true,
"type": "none",
@@ -55,7 +55,7 @@
]
},
{
"column": "Plugin",
"column": "plugin",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
@@ -74,7 +74,7 @@
]
},
{
"column": "Object_PrimaryID",
"column": "objectPrimaryId",
"css_classes": "col-sm-2",
"show": true,
"type": "device_ip",
@@ -93,7 +93,7 @@
]
},
{
"column": "Object_SecondaryID",
"column": "objectSecondaryId",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -112,7 +112,7 @@
]
},
{
"column": "DateTimeCreated",
"column": "dateTimeCreated",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -131,7 +131,7 @@
]
},
{
"column": "DateTimeChanged",
"column": "dateTimeChanged",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
@@ -150,7 +150,7 @@
]
},
{
"column": "Watched_Value1",
"column": "watchedValue1",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
@@ -169,7 +169,7 @@
]
},
{
"column": "Watched_Value2",
"column": "watchedValue2",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -188,7 +188,7 @@
]
},
{
"column": "Watched_Value3",
"column": "watchedValue3",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
@@ -207,7 +207,7 @@
]
},
{
"column": "Watched_Value4",
"column": "watchedValue4",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
@@ -226,7 +226,7 @@
]
},
{
"column": "UserData",
"column": "userData",
"css_classes": "col-sm-2",
"show": true,
"type": "textbox_save",
@@ -245,7 +245,7 @@
]
},
{
"column": "Status",
"column": "status",
"css_classes": "col-sm-1",
"show": true,
"type": "replace",
@@ -281,7 +281,7 @@
]
},
{
"column": "Extra",
"column": "extra",
"css_classes": "col-sm-3",
"show": true,
"type": "label",
@@ -483,12 +483,12 @@
}
]
},
"default_value": ["Watched_Value1"],
"default_value": ["watchedValue1"],
"options": [
"Watched_Value1",
"Watched_Value2",
"Watched_Value3",
"Watched_Value4"
"watchedValue1",
"watchedValue2",
"watchedValue3",
"watchedValue4"
],
"localized": ["name", "description"],
"name": [
@@ -504,11 +504,11 @@
"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 Domain Name Server</li><li><code>Watched_Value2</code> is IP Offered</li><li><code>Watched_Value3</code> is Interface </li><li><code>Watched_Value4</code> is Router </li></ul>"
"string": "Send a notification if selected values change. Use <code>CTRL + Click</code> to select/deselect. <ul> <li><code>watchedValue1</code> is Domain Name Server</li><li><code>watchedValue2</code> is IP Offered</li><li><code>watchedValue3</code> is Interface </li><li><code>watchedValue4</code> is Router </li></ul>"
},
{
"language_code": "es_es",
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>Watched_Value1</code> es servidor de nombres de dominio</li><li><code>Watched_Value2</code> es IP ofrecida</li><li><code>Watched_Value3</code> es Interfaz </li><li><code>Watched_Value4</code> es enrutador </li></ul>"
"string": "Envíe una notificación si los valores seleccionados cambian. Utilice <code>CTRL + clic</code> para seleccionar/deseleccionar. <ul> <li><code>watchedValue1</code> es servidor de nombres de dominio</li><li><code>watchedValue2</code> es IP ofrecida</li><li><code>watchedValue3</code> es Interfaz </li><li><code>watchedValue4</code> es enrutador </li></ul>"
}
]
},
@@ -540,11 +540,11 @@
"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."
},
{
"language_code": "es_es",
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>Watched_ValueN</code> seleccionadas cambiaron."
"string": "Envíe una notificación solo en estos estados. <code>new</code> significa que se descubrió un nuevo objeto único (una combinación única de PrimaryId y SecondaryId). <code>watched-changed</code> significa que las columnas <code>watchedValueN</code> seleccionadas cambiaron."
}
]
}