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 you3 Replies
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...See the docs https://orm.drizzle.team/kit-docs/commands
List of commands - DrizzleORM
Drizzle ORM | %s
Editing your migration file should have no issues.