drizzle-team / drizzle-team/drizzle-orm

[BUG]: Types of updated schemas are not been generated after migration

Open
#3,877 2 comments 0 reactions 0 assignees View on GitHub
bug priority qb/crud
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.36.1

### What version of `drizzle-kit` are you using?

0.28.0

### Other packages

_No response_

### Describe the Bug

Hello, I have encountered an issue concerning type generation. When a schema is updated, After updating a schema and running the commands `npx drizzle-kit generate` and `npx drizzle-kit migrate`, the newly added fields are not recognized in the code, even after restarting the TypeScript server in VSCode.

### Schema:
![image](https://github.com/user-attachments/assets/b3aacf12-1006-43dd-851a-9cf26a8fb382)


### Error:
![image](https://github.com/user-attachments/assets/794a6dca-b637-4c93-aab1-294ded46bc36)

### Database have been successfully updated:
![image](https://github.com/user-attachments/assets/5c8dd27c-fbbf-4e60-a976-6cfa84b48b0c)

With this being said, there is no problem with migration using drizzle-kit, but new types are not being generated automatically.

I tried deleting drizzle folder and creating the migrations again, but this also did not work.

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.