// Migration: Add requeued_at column to ivanti_fp_submissions table
const pool = require('../db');

async function run() {
    console.log('Starting FP submissions requeued_at migration...');
    try {
        await pool.query(`ALTER TABLE ivanti_fp_submissions ADD COLUMN IF NOT EXISTS requeued_at TIMESTAMPTZ DEFAULT NULL`);
        console.log('✓ requeued_at column added (or already exists)');
    } catch (err) {
        console.error('Error adding requeued_at column:', err.message);
        process.exit(1);
    }
    console.log('Migration complete.');
    process.exit(0);
}

run();
