const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database('./inventory.db');

console.log('Adding TAG column to skus table...');

db.run(`ALTER TABLE skus ADD COLUMN tag TEXT DEFAULT ''`, (err) => {
    if (err) {
        if (err.message.includes('duplicate column')) {
            console.log('TAG column already exists - skipping migration');
        } else {
            console.error('Error adding TAG column:', err.message);
        }
    } else {
        console.log('✅ TAG column added successfully!');
    }
    
    db.close();
});
