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]:"drizzle-kit generate" doesn't generate a migration file when a column is added. #2307

Closed
alirv90 opened this issue May 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@alirv90
Copy link

alirv90 commented May 13, 2024

What version of drizzle-orm are you using?

0.30.10

What version of drizzle-kit are you using?

0.21.1

Describe the Bug

"drizzle-kit generate" doesn't generate a migration file when a column is added.

drizzle-kit generate work well when I init schema and modify existing field, but when I add a new column, it don't generate any thing.

My GitHub repo

rzz@Nguyens drizzle-kit-play % pnpm generate

> @ generate /Users/rzz/Workspace/drizzle-kit-play
> drizzle-kit generate

drizzle-kit: v0.21.1
drizzle-orm: v0.30.10

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/rzz/Workspace/drizzle-kit-play/drizzle.config.ts'
1 tables
users 3 columns 0 indexes 0 fks

[✓] Your SQL migration file ➜ drizzle/0000_bumpy_mother_askani.sql 🚀


# Make email is unique

rzz@Nguyens drizzle-kit-play % pnpm generate

> @ generate /Users/rzz/Workspace/drizzle-kit-play
> drizzle-kit generate

drizzle-kit: v0.21.1
drizzle-orm: v0.30.10

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/rzz/Workspace/drizzle-kit-play/drizzle.config.ts'
1 tables
users 3 columns 1 indexes 0 fks

[✓] Your SQL migration file ➜ drizzle/0001_thankful_nova.sql 🚀

# Add password field

rzz@Nguyens drizzle-kit-play % pnpm generate

> @ generate /Users/rzz/Workspace/drizzle-kit-play
> drizzle-kit generate

drizzle-kit: v0.21.1
drizzle-orm: v0.30.10

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/rzz/Workspace/drizzle-kit-play/drizzle.config.ts'
1 tables
users 4 columns 1 indexes 0 fks

No schema changes, nothing to migrate 😴

Expected behavior

No response

Environment & setup

No response

@alirv90 alirv90 added the bug Something isn't working label May 13, 2024
@AndriiSherman
Copy link
Member

Thanks for a repo, looking into it

@AndriiSherman
Copy link
Member

Found the reason, should be released today

@AndriiSherman
Copy link
Member

should be fixed in drizzle-kit@0.21.2. Feel free to reopen if it is not fixed for you!

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

2 participants