Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Implicit sequences are not tracked in migrations #2567

Open
aeons opened this issue Jun 28, 2024 · 0 comments
Open

[BUG]: Implicit sequences are not tracked in migrations #2567

aeons opened this issue Jun 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@aeons
Copy link

aeons commented Jun 28, 2024

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.

@aeons aeons added the bug Something isn't working label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant