drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: Non-destructive `push --force`
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
From drizzle-kit-mirror repo: https://github.com/drizzle-team/drizzle-kit-mirror/issues/608.
> [Current options](https://orm.drizzle.team/docs/drizzle-kit-push#extended-list-of-configurations) for `drizzle-kit push`:
> command description
> verbose print all SQL statements prior to execution
> strict always ask for approval before executing SQL statements
> force auto-accept all data-loss statements
>
> Options when interactive:
>
> ```
> [✓] Pulling schema from database...
> · You're about to add unique_foo unique constraint to the table, which contains 217627 items. If this statement fails, you will receive an error from the database. Do you want to truncate foo?
>
> ❯ No, add the constraint without truncating the table
> Yes, truncate the table
> ```
>
> There is no way to push in CI/CD without truncating, or specify the first option from interactive. Note: `--force` will only select the second option.
Contributor guide
Assessment
This issue has not been assessed yet.