gambitboy
gambitboy
Explore posts from servers
DTDrizzle Team
Created by gambitboy on 6/6/2023 in #help
Postgres-js Migrate - Error: Can't find meta/_journal.json file [SOLVED]
I've gotten drizzle setup and running but I'm unable to run any migrations. I'm using postgres-js and created a migrate.ts file that i'm executing. Here is my code: /lib/migrate.ts
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

const migrationClient = postgres("...", { max: 1 });
migrate(drizzle(migrationClient), { migrationsFolder: '../migrations-folder' });
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

const migrationClient = postgres("...", { max: 1 });
migrate(drizzle(migrationClient), { migrationsFolder: '../migrations-folder' });
I setup my config file: ./crizzle.config.json
{
"out": "./migrations-folder",
"schema": "./lib/drizzle.ts",
"breakpoints": false
}
{
"out": "./migrations-folder",
"schema": "./lib/drizzle.ts",
"breakpoints": false
}
so I've managed to generate some migrations in the migrations-folder but the migrate function is failing. I've tried different databases, locations, tried to trigger the migration through a trpc api call.
10 replies