2024-09-14 12:55:54 +00:00
|
|
|
#!/usr/bin/env node
|
2023-10-14 09:08:10 +00:00
|
|
|
// @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 sqlite = require("better-sqlite3")
|
|
|
|
|
2024-09-14 12:55:54 +00:00
|
|
|
const passthrough = require("../src/passthrough")
|
2023-10-14 09:08:10 +00:00
|
|
|
const db = new sqlite("db/ooye.db")
|
2024-09-14 12:55:54 +00:00
|
|
|
const migrate = require("../src/db/migrate")
|
2023-10-14 09:08:10 +00:00
|
|
|
|
2024-09-14 12:55:54 +00:00
|
|
|
Object.assign(passthrough, {db})
|
2023-10-14 09:08:10 +00:00
|
|
|
|
|
|
|
migrate.migrate(db)
|