
const Database = require('better-sqlite3');
const path = require('path');

const dbPath = path.resolve(__dirname, '../prisma/dev.db');
const db = new Database(dbPath);

try {
  const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all();
  console.log(JSON.stringify(tables, null, 2));
} catch (err) {
  console.error('Error fetching tables:', err.message);
  process.exit(1);
} finally {
  db.close();
}
