Initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Standalone DB initializer (run with: npm run db:init)
|
||||
import 'dotenv/config';
|
||||
import db from './index.js';
|
||||
|
||||
console.log('SQLite database initialized.');
|
||||
console.log(`Tables: ${db
|
||||
.prepare("SELECT name FROM sqlite_master WHERE type='table' ORDER BY name")
|
||||
.all()
|
||||
.map(r => r.name)
|
||||
.join(', ')}`);
|
||||
|
||||
db.close();
|
||||
Reference in New Issue
Block a user