out-of-your-element/scripts/check-migrate.js
2025-09-08 22:16:17 -04:00

14 lines
416 B
JavaScript
Executable file

#!/usr/bin/env node
// @ts-check
// Trigger the database migration flow and exit after committing.
// You can use this to run migrations locally and check the result using sqlitebrowser.
const passthrough = require("../src/passthrough")
const {getDatabase} = require("../src/db/database")
const db = getDatabase()
const migrate = require("../src/db/migrate")
Object.assign(passthrough, {db})
migrate.migrate(db)