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,