drizzle-team / drizzle-team/drizzle-orm

[BUG]: No way to disable schema creation in drizzle-kit

Open
#4,745 7 comments 11 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Report hasn't been filed before.

- [x] I have verified that the bug I'm about to report hasn't been filed before.

### What version of `drizzle-orm` are you using?

0.43.1

### What version of `drizzle-kit` are you using?

0.30.4

### Other packages

_No response_

### Describe the Bug

Our Postgres db-user accounts do not have access to `CREATE SCHEMA`, so all migrations pass locally but fail in our staging/production environments. We already setup the schema in other systems, so this forced schema creation causes all our migrations to fail with this error:

```
[⣷] applying migrations...error: permission denied for database my-service
at /app/my-service/node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3/node_modules/pg-pool/index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async PgDialect.migrate (/app/my-service/node_modules/.pnpm/drizzle-orm@0.43.1_@types+pg@8.15.4_pg@8.16.3/node_modules/src/pg-core/dialect.ts:85:3)
at async migrate (/app/my-service/node_modules/.pnpm/drizzle-orm@0.43.1_@types+pg@8.15.4_pg@8.16.3/node_modules/src/node-postgres/migrator.ts:10:2)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.