Migrations not being applied (drizzle-orm/node-postgres/migrator)
im kind of struggling with migrations... i have the following migration index.ts which i run whenever i generate a new migration
the generate command with drizzle-kit did generate the sql file and it looks perfectly fine, but when i attempt to run the index.ts file in order to actually run the migration (
"migrate": "node -r esbuild-register ./src/db/master/index.ts",
) the only output i get in the console is this:
api:migrate: Query: CREATE SCHEMA IF NOT EXISTS "drizzle"
and whenever i run the application it fails withapi:dev: error: relation "sessions" does not exist
(using relational queries), so im guessing the changes arent being pushed to postgres with my script...
any idea?3 Replies
ive also managed to run introspect on the db and its definitely empty
https://github.com/Pridestalkerr/drizzle-issue
minimal example to reproduce the issue
GitHub
GitHub - Pridestalkerr/drizzle-issue
Contribute to Pridestalkerr/drizzle-issue development by creating an account on GitHub.
tried with
postgres
instead of pg
and it works... should I open an issue or am I missing something? (maybe migrations not implemented for node-postgres
?