main
|
Last change
on this file since b9dc94c was 7bc636b, checked in by Robin <robin@ā¦>, 4 months ago |
|
Initial commit ā PrutFolio v1 source (pulled from Hetzner /srv/prutfolio)
|
-
Property mode
set to
100644
|
|
File size:
402 bytes
|
| Line | Ā |
|---|
| 1 | #!/usr/bin/env node
|
|---|
| 2 | import 'dotenv/config';
|
|---|
| 3 | import db, { initializeDatabase } from '../config/database.js';
|
|---|
| 4 |
|
|---|
| 5 | console.log('š§ Running migrations...');
|
|---|
| 6 | initializeDatabase();
|
|---|
| 7 |
|
|---|
| 8 | const tables = db.prepare(`
|
|---|
| 9 | SELECT name FROM sqlite_master WHERE type='table' ORDER BY name
|
|---|
| 10 | `).all();
|
|---|
| 11 |
|
|---|
| 12 | console.log('\nš Tables:');
|
|---|
| 13 | tables.forEach(t => console.log(' ā', t.name));
|
|---|
| 14 | console.log('\nā
Done.');
|
|---|
| 15 | db.close();
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.