7 lines
329 B
JavaScript
7 lines
329 B
JavaScript
const db = require('better-sqlite3')('data/ai-review.db');
|
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all();
|
|
for (const t of tables) {
|
|
console.log('=== ' + t.name + ' ===');
|
|
const cols = db.prepare('PRAGMA table_info(' + t.name + ')').all();
|
|
console.log(JSON.stringify(cols, null, 2));
|
|
} |