
import 'dotenv/config';
import { query } from '../src/db';

async function run() {
    console.log('Migrating database: Adding importance_score to snapshots table...');
    try {
        await query(`
            ALTER TABLE snapshots 
            ADD COLUMN IF NOT EXISTS importance_score INTEGER DEFAULT 0;
        `);
        console.log('Migration successful: importance_score column added.');
    } catch (err) {
        console.error('Migration failed:', err);
    }
    process.exit();
}

run();
