drizzle-team / drizzle-team/drizzle-orm
[BUG]: No way to disable schema creation in drizzle-kit
- 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
Assessment
This issue has not been assessed yet.