drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: "Not Updatable" column marking
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
Hello y'all!
Thank you so much for the great library, I'm just starting but already enjoying working with it!
I wonder if there has ever been a discussion regarding some sort of way of annotating a table field as not "updatable", as in once it has been created (inserted) that particular field can't be updated, types inferred from the table schema with remove that field if there was to be an InferUpdate made, and maybe even the library throws or errors if that field is included in an update request.
I've read that some DBs can achieve the idea through complex server side functions and this features obviously doesn't prevent someone not using this particular schema insight into the table from doing an update but I think it would still encourage good practices for people crunching within the library.
Contributor guide
Assessment
This issue has not been assessed yet.