Fix compliance table column names (snake_case to camelCase)

Renamed columns in compliance and compliancescans tables:
- scan_date -> scandate
- deployment_notes -> deploymentnotes
- is_third_party_managed -> isthirdpartymanaged
- third_party_manager -> thirdpartymanager
- ot_asset_* -> otasset*
- is_compliant -> iscompliant
- compliance_notes -> compliancenotes
- scan_name -> scanname
- scan_result -> scanresult
- scan_details -> scandetails

Updated ASP files:
- displaymachine.asp, displaypc.asp - fixed column reads
- editmachine.asp, editpc.asp, editdevice.asp, machine_edit.asp - fixed column reads
- savemachineedit.asp, savemachine_direct.asp, updatedevice_direct.asp - fixed SQL

Updated production migration guide with new Step 4 for compliance columns.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-10 20:22:49 -05:00
parent aac39d8a9f
commit 6162db9fcf
11 changed files with 207 additions and 51 deletions

View File

@@ -599,11 +599,11 @@ End If
<div class="col-md-8">
<%
Dim thirdPartyManaged, thirdPartyManager, otAssetSystem, dodAssetDeviceType, isCompliant
thirdPartyManaged = rs2("is_third_party_managed") & ""
thirdPartyManager = rs2("third_party_manager") & ""
otAssetSystem = rs2("ot_asset_system") & ""
dodAssetDeviceType = rs2("ot_asset_device_type") & ""
isCompliant = rs2("is_compliant")
thirdPartyManaged = rs2("isthirdpartymanaged") & ""
thirdPartyManager = rs2("thirdpartymanager") & ""
otAssetSystem = rs2("otassetsystem") & ""
dodAssetDeviceType = rs2("otassetdevicetype") & ""
isCompliant = rs2("iscompliant")
' Third party managed badge
Dim tpmBadge
@@ -654,7 +654,7 @@ End If
Set rs2 = Nothing
' Query security scans
strSQL2 = "SELECT * FROM compliancescans WHERE machineid = ? ORDER BY scan_date DESC LIMIT 10"
strSQL2 = "SELECT * FROM compliancescans WHERE machineid = ? ORDER BY scandate DESC LIMIT 10"
Set rs2 = ExecuteParameterizedQuery(objConn, strSQL2, Array(machineid))
If rs2.EOF Then
@@ -662,10 +662,10 @@ End If
Else
Do While Not rs2.EOF
Dim scanName, scanDate, scanResult, scanDetails, resultBadge
scanName = rs2("scan_name") & ""
scanDate = rs2("scan_date") & ""
scanResult = rs2("scan_result") & ""
scanDetails = rs2("scan_details") & ""
scanName = rs2("scanname") & ""
scanDate = rs2("scandate") & ""
scanResult = rs2("scanresult") & ""
scanDetails = rs2("scandetails") & ""
If scanName = "" Then scanName = "Security Scan"
If scanDetails = "" Then scanDetails = "<span class='text-muted'>No details</span>"