Enforce nullable constraints
Our previous definitions of nanoId and encryptedText in our database schema use Typescript to mark them as being required fields, but in practice that constrain isn't being enforced in the actual SQL DB schema. This means the types are lying. I was about to check and we have a non-insignificant amount of records which break these constrains which would be resulting in runtime errors for users trying to use Cap.
This PR updates the Drizzle schema to enforce these constrains and also relaxes the Typescript type on some fields to align with the reliability of the data in the database.
Blockers:
- [x] We need #1066 merged and
orgIdto be required onvideos - [ ] Figure out notifications
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
✨ Finishing touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
enforce-nullable-constrains
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.