drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.41k stars 639 forks source link

[FEATURE]: Create postgresql schema only if not exists #2335

Open Entsllor opened 6 months ago

Entsllor commented 6 months ago

Describe what you want

drizzle-kit="0.21.2", drizzle-orm="0.30.10", postgres.js="3.4.4"

When I generate first migration, the migration file contains:

CREATE SCHEMA "my_shema_name";

But I already have this schema. It would be great to have "IF NOT EXISTS" in the migration file

CREATE SCHEMA IF NOT EXISTS "my_shema_name";
nishogi commented 3 months ago

Any update ?

LaCocoRoco commented 2 months ago

+1