Skip to content

Commit 152f3e4

Browse files
authored
Merge pull request #857 from JamesHabben/main
Update module_updates.md
2 parents 016980c + 1875684 commit 152f3e4

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

admin/docs/module_updates.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,37 @@ By focusing modules on data extraction and processing, we improve code readabili
133133
- The `artifact_processor` decorator now automatically retrieves the artifact information from the function's globals or the module's `__artifacts_v2__` dictionary.
134134
- The main function should focus solely on data extraction and processing, returning the data for the artifact processor to handle output generation.
135135

136+
### Avoiding SQL Reserved Words in Column Names
137+
138+
When updating modules, it's crucial to avoid using SQL reserved words as column names. This is particularly important now that we're using SQLite for data storage. Common problematic column names include:
139+
140+
- 'value'
141+
- 'values'
142+
- 'key'
143+
- 'order'
144+
- 'group'
145+
146+
To address this:
147+
148+
1. Review your data_headers and ensure no column names use SQL reserved words.
149+
2. If you find a reserved word, modify the column name to something more descriptive or append a relevant qualifier.
150+
151+
Examples of how to modify column names:
152+
153+
- 'value' could become 'data_value', 'setting_value', or 'recorded_value'
154+
- 'key' could become 'encryption_key', 'lookup_key', or 'identifier'
155+
- 'order' could become 'sort_order', 'sequence', or 'priority'
156+
157+
```python
158+
# Before
159+
data_headers = ('timestamp', 'key', 'value')
160+
161+
# After
162+
data_headers = ('timestamp', 'identifier', 'setting_value')
163+
```
164+
165+
By avoiding SQL reserved words in column names, we prevent potential issues with SQLite queries and ensure smoother data handling across all output types.
166+
136167
### Timestamp Handling and Timezone Offsets
137168

138169
A new function `convert_plist_date_to_timezone_offset` is being added to `ilapfuncs.py` to address issues with timestamp handling, particularly for plist files. This function:

0 commit comments

Comments
 (0)