DT
Drizzle Teamdandadan
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?dandadan•319d ago
ive also managed to run introspect on the db and its definitely empty
dandadan•319d ago
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.
dandadan•319d ago
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
?The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsDelete limitHi, how do I delete just 1 row from a table?
```ts
// Example:
db.delete(dogs).where(eq(dogs.breed, Many to many - PlanetscaleAnyone here has an example of declaring many to many relationship when using Planetscale?
https://orInserting with RelationHi,
What is the way of inserting a new record with a relationship in Drizzle. I understand that Prisql escaping on whereTrying to do the following:
```
where: sql`unaccent(${users.fullName}) ILIKE unaccent('%${input.queBroken typescript in selectWhatever I put inside the select function. it will generate this typescript error:
I am using the laWhy is introspecting creating tables that didn't previously existMore context here: https://github.com/drizzle-team/drizzle-orm/issues/847Passing SQL functions to insertIs there any way to pass a SQL function like `gen_random_uuid()` to the `insert` function, for a speDrizzle-kit database push connection errorWhen trying to run `drizzle-kit push:mysql` to push my schema to Planetscale, I get the following er