Make things work with or without bundler
Test / test (push) Failing after 55s
Details
Test / test (push) Failing after 55s
Details
This commit is contained in:
parent
b1bbe9a314
commit
3a4d670d04
|
|
@ -2,13 +2,17 @@ import { promises as fs } from "fs"
|
||||||
import { FileMigrationProvider, Migrator } from "kysely"
|
import { FileMigrationProvider, Migrator } from "kysely"
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import { db } from "./database"
|
import { db } from "./database"
|
||||||
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
|
let filename = __filename ?? fileURLToPath(import.meta.url)
|
||||||
|
let dirname = __dirname ?? path.dirname(filename)
|
||||||
|
|
||||||
const migrator = new Migrator({
|
const migrator = new Migrator({
|
||||||
db,
|
db,
|
||||||
provider: new FileMigrationProvider({
|
provider: new FileMigrationProvider({
|
||||||
fs,
|
fs,
|
||||||
path,
|
path,
|
||||||
migrationFolder: path.join(__dirname, "migrations"),
|
migrationFolder: path.join(dirname, "migrations"),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue