Blixkreeg
Blixkreeg
Explore posts from servers
DTDrizzle Team
Created by Gary, el Pingüino Artefacto on 6/3/2024 in #help
Helpers for querying in the new PostGIS Geometry type
Do these types install postgis extension automatically?
3 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
I interpret this as built in support. But there is no way to define a down migration. It's handled for you. If you'd like to delete the migration file you can go through the steps above and then run the drop command here https://orm.drizzle.team/kit-docs/commands#drop-migration
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
When you remove an attribute from the table schema, drizzle kit calculates what changed and generates the correct migration to drop the column.
18 replies
DTDrizzle Team
Created by addamsson on 6/3/2024 in #help
Is there a way to do a "down" migration with Drizzle?
remove the column from one of your tables in the drizzle schema and regenerate and migrate.
18 replies
DTDrizzle Team
Created by Blixkreeg on 4/29/2024 in #help
DatabaseErrorException: ERROR: column "due_date" is of type timestamp
bump
3 replies
DTDrizzle Team
Created by Blixkreeg on 4/29/2024 in #help
DatabaseErrorException: ERROR: column "due_date" is of type timestamp
Using postgresql driver btw
3 replies
DTDrizzle Team
Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
ok i see. is this error coming from running a query? Have you made sure you generated your migrations and migrated after every change?
25 replies
DTDrizzle Team
Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
you're using a postgres database? And have you been able to run any migrations at all?
25 replies
DTDrizzle Team
Created by nr7751 on 2/26/2024 in #help
Can someone direct me to a UUID implementation as PK with Drizzle ORM?
Try something like this:
import { pgTable, uuid } from "drizzle-orm/pg-core"

export const user = pgTable("users", {
id: uuid("id").primaryKey().defaultRandom(),
})
import { pgTable, uuid } from "drizzle-orm/pg-core"

export const user = pgTable("users", {
id: uuid("id").primaryKey().defaultRandom(),
})
25 replies