const { db } = require('../src/database/db'); async function addMustChangePasswordColumn() { try { // Check if the column already exists const hasMustChangePassword = await db.schema.hasColumn('admin_users', 'must_change_password'); if (!hasMustChangePassword) { await db.schema.table('admin_users', (table) => { table.boolean('must_change_password').defaultTo(false); }); console.log('✅ Added must_change_password column to admin_users table'); } else { console.log('â„šī¸ must_change_password column already exists'); } process.exit(0); } catch (error) { console.error('❌ Migration failed:', error); process.exit(1); } } addMustChangePasswordColumn();