From be2d1fa68eb801b723ef4055d4602452bc9e19b1 Mon Sep 17 00:00:00 2001 From: jason Date: Sat, 7 Mar 2026 09:41:50 -0600 Subject: [PATCH] feat(db): add notes column to employees table --- db/database.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/database.js b/db/database.js index cba0200..d4fe68b 100755 --- a/db/database.js +++ b/db/database.js @@ -20,6 +20,10 @@ if (!cols.includes('negated_at')) db.exec("ALTER TABLE violations ADD C if (!cols.includes('prior_active_points')) db.exec("ALTER TABLE violations ADD COLUMN prior_active_points INTEGER"); if (!cols.includes('prior_tier_label')) db.exec("ALTER TABLE violations ADD COLUMN prior_tier_label TEXT"); +// Employee notes column (free-text, does not affect scoring) +const empCols = db.prepare('PRAGMA table_info(employees)').all().map(c => c.name); +if (!empCols.includes('notes')) db.exec("ALTER TABLE employees ADD COLUMN notes TEXT"); + // Ensure resolutions table exists db.exec(`CREATE TABLE IF NOT EXISTS violation_resolutions ( id INTEGER PRIMARY KEY AUTOINCREMENT,