const { Sequelize } = require('sequelize');
const sequelize = require('./config/database');

async function migrate() {
    try {
        console.log("Migrating 'status' column to VARCHAR...");
        await sequelize.query("ALTER TABLE orders MODIFY COLUMN status VARCHAR(255) DEFAULT 'pending'");
        console.log("Migration successful!");
    } catch (error) {
        console.error("Migration failed:", error);
    }
}

migrate();
