
const db = require('../src/db');

async function migrate() {
    try {
        console.log("Adding mobile_session_token column...");
        await db.query("ALTER TABLE users ADD COLUMN mobile_session_token VARCHAR(255) DEFAULT NULL");
        console.log("Success!");
        process.exit();
    } catch (err) {
        if (err.code === 'ER_DUP_FIELDNAME') {
            console.log("Column already exists.");
            process.exit();
        }
        console.error(err);
        process.exit(1);
    }
}

migrate();
