migration failed

code:
const migrationClient = postgres("postgresql://jer:admin@localhost:5432/test", { max: 1 })

async function main() {
console.log('postgres migration started...')
await migrate(drizzle(migrationClient), {
migrationsFolder: path.resolve('drizzel')
})
console.log('postgres migration ended...')
}
const migrationClient = postgres("postgresql://jer:admin@localhost:5432/test", { max: 1 })

async function main() {
console.log('postgres migration started...')
await migrate(drizzle(migrationClient), {
migrationsFolder: path.resolve('drizzel')
})
console.log('postgres migration ended...')
}
Error:
postgres migration started...
Error: Can't find meta/_journal.json file
at readMigrationFiles (file:///home/jer/rtp-repo/node_modules/src/migrator.ts:40:9)
at migrate (file:///home/jer/rtp-repo/node_modules/src/postgres-js/migrator.ts:9:21)
at main (file:///home/jer/rtp-repo/apps/web-app/src/lib/db/migrate.ts:10:9)
at file:///home/jer/rtp-repo/apps/web-app/src/lib/db/migrate.ts:16:1
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
postgres migration started...
Error: Can't find meta/_journal.json file
at readMigrationFiles (file:///home/jer/rtp-repo/node_modules/src/migrator.ts:40:9)
at migrate (file:///home/jer/rtp-repo/node_modules/src/postgres-js/migrator.ts:9:21)
at main (file:///home/jer/rtp-repo/apps/web-app/src/lib/db/migrate.ts:10:9)
at file:///home/jer/rtp-repo/apps/web-app/src/lib/db/migrate.ts:16:1
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
the meta/_journal.json file exists
3 Replies
Noahh
Noahh15mo ago
Is drizzel supposed to be spelled that way? if your folder isn't named that that could be why
Jeremy
JeremyOP15mo ago
oh my bad, its working now, Thanks.
Noahh
Noahh15mo ago
👍
Want results from more Discord servers?
Add your server