const sqlite3 = require('sqlite3').verbose();
const path = require('path');
const db = new sqlite3.Database(path.join(__dirname, 'inventory.db'));


db.all('PRAGMA table_info(transactions)', [], (err, rows) => {
    if (err) {
        console.error(err);
        process.exit(1);
    }
    console.log(JSON.stringify(rows, null, 2));

    const hasAmountPaid = rows.some(r => r.name === 'amount_paid');
    console.log('Has amount_paid column:', hasAmountPaid);
});
