Fix database schema documentation to match actual tables

- Fix table names: pc_comm_config → commconfig, pc_dnc_config → dncconfig
- Fix column name: communications.gateway → defaultgateway
- Clarify printers uses 'ipaddress' while communications uses 'address'
- Update CREATE TABLE statements to match actual schema
- Add warranties table to QUICK_REFERENCE.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-11 17:09:44 -05:00
parent 76c6145bf7
commit d1a93979f2
3 changed files with 54 additions and 45 deletions

View File

@@ -50,11 +50,11 @@ machines (machineid, hostname, serialnumber, alias, machinenumber,
pctype (pctypeid, typename)
-- Values: Standard, Engineer, Shopfloor, CMM, Wax Trace, etc.
-- PC Communication Config (serial ports)
pc_comm_config (commconfigid, machineid, portname, baudrate, databits, parity, stopbits)
-- Communication Config (serial ports for equipment)
commconfig (configid, machineid, configtype, portid, baud, databits, parity, ipaddress)
-- PC DNC Config
pc_dnc_config (dncconfigid, machineid, site, cnc, ncif, dualpath_enabled, path1_name, path2_name)
-- DNC Config
dncconfig (dncid, machineid, site, cnc, ncif, dualpath_enabled, path1_name, path2_name)
-- PC-to-Equipment Relationships
machinerelationships (relationshipid, machineid, related_machineid, relationshiptypeid)
@@ -63,9 +63,9 @@ machinerelationships (relationshipid, machineid, related_machineid, relationship
### Network & Communications
```sql
-- All network interfaces (replaces pc_network_interfaces)
-- All network interfaces
communications (comid, machineid, comstypeid, address, macaddress,
subnetmask, gateway, interfacename, isprimary, isactive)
subnetmask, defaultgateway, interfacename, isprimary, isactive)
-- comstypeid 1 = Network Interface
-- NOTE: Column is 'address' not 'ipaddress'
@@ -97,11 +97,14 @@ knowledgebase (linkid, shortdescription, keywords, applicationid, linkurl, click
### Infrastructure
```sql
-- Printers (separate table, not in machines)
printers (printerid, printercsfname, modelid, serialnumber, address, fqdn, isactive)
-- NOTE: Column is 'address' not 'ipaddress'
printers (printerid, printercsfname, modelid, serialnumber, ipaddress, fqdn, isactive)
-- NOTE: Printers use 'ipaddress' (unlike communications which uses 'address')
-- Notifications
notifications (notificationid, notification, starttime, endtime, isactive, notificationtypeid)
-- Warranties
warranties (warrantyid, machineid, enddate, servicelevel, status, daysremaining)
```
### Reference Data