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

async function test() {
    try {
        await db.initDB();
        console.log('DB Init OK');
        const [rows] = await db.query('SELECT * FROM app_prompts LIMIT 1');
        console.log('Rows:', rows);
        const mapped = rows.map(r => ({ ...r, is_active: !!r.is_active }));
        console.log('Mapped:', mapped);
        console.log('Success');
        process.exit(0);
    } catch (e) {
        console.error('Error:', e);
        process.exit(1);
    }
}

test();
