Centralize credentials and make migration idempotent

- Move all DB credentials to config.asp with DSN/ODBC toggle
- Add Zabbix API URL and token to centralized config
- Update sql.asp, api.asp, apiusb.asp, zabbix.asp to use config
- Add GetConnectionString() and GetEmployeeConnectionString() functions
- Make migration SQL idempotent (safe to run multiple times)
- Add duplicate index cleanup (appname_2) to migration
- Document employee DB access limitation in CLAUDE.md

🤖 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-12 08:11:28 -05:00
parent e0d89f9957
commit 131aaaddbf
9 changed files with 150 additions and 77 deletions

View File

@@ -1,8 +1,10 @@
<!--#include file="config.asp"-->
<%
' Employee database connection - uses centralized config
Dim objConn
Session.Timeout=15
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DSN=wjf_employees;Uid=root;Pwd=WJF11sql"
objConn.Open
set rs = server.createobject("ADODB.Recordset")
Session.Timeout = APP_SESSION_TIMEOUT
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = GetEmployeeConnectionString()
objConn.Open
Set rs = Server.CreateObject("ADODB.Recordset")
%>