drizzle-team / drizzle-team/drizzle-orm
[BUG]: Implicit sequences are not tracked in migrations
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
0.31.2
### What version of `drizzle-kit` are you using?
0.22.7
### Describe the Bug
Sequences created by using the `*serial` column types in postgres are not tracked by migrations.
I mistakenly created a reference column with type `bigserial` rather than `bigint`. After fixing the mistake and generating the migration that changed the column type, the underlying sequence was not deleted and the default on the column was still in place.
Similarly, renaming a column that has an implicit sequence attached will not rename the sequence.
### Expected behavior
I would expect the generated migration to also update the underlying sequences.
### Environment & setup
At least when targeting postgres for migrations.
Contributor guide
Assessment
This issue has not been assessed yet.