1// Migration script placed inside backend so it can reuse backend's node_modules and dotenv
2const pool = require('../services/db');
6 console.log('Running backend migration: add status column to customers');
7 const sql = "ALTER TABLE customers ADD COLUMN IF NOT EXISTS status VARCHAR(50) DEFAULT 'active';";
9 console.log('Migration applied successfully');
11 console.error('Migration failed:', err);
14 try { await pool.end(); } catch(e){}