Postgres: install plugin during migration

So, I'm using Drizzle with Postgres and am using uuid for the id fields. For that, i need to run the command: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; after creating the database. Is there a way to automate this in the first migration file? Is it safe to just paste it at the begining of the first migration file? Thank you
3 Replies
Dhan
Dhan16mo ago
Hey, I saw this question here: https://www.answeroverflow.com/m/1134215299139383466 I found the answer... run generate with the --custom flag e.g. drizzle-kit generate:pg --custom. It will generate empty SQL for custom migration.
Answer Overflow
Postgres: install plugin during migration - Drizzle Team
So, I'm using Drizzle with Postgres and am using uuid for the id fields. For that, i need to run the command: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; afte...
Angelelz
Angelelz16mo ago
Editing your migration file should have no issues.
Want results from more Discord servers?
Add your server