drizzle-team / drizzle-team/drizzle-orm

[BUG]: drizzle-kit pushSchema requires manual input when renaming column

Open
#4,651 0 comments 2 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.31.1

### Other packages

_No response_

### Describe the Bug

The [`pushSchema`](https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-kit/src/api.ts#L109) API trys to get user input when a column might be renamed. It doesn't appear possible to configure this behaviour.

This makes using it as a reliable API (e.g. in tests, CI) extremely difficult.

There is a `--force` option for `drizzle push`, but no equivalent for `pushSchema`. Maybe it would be good to have some kind of option to support this?

Related: https://github.com/drizzle-team/drizzle-orm/issues/4531 (this issue is about the case where adding a unique constraint cannot be bypass with `drizzle push --force`, but also discusses its interactions with `pushSchema`)

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.