ENG-1906 Add Content.content_type and backfill rows#1154
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR size/scope checkThis PR is over our review-size guideline.
Please split this into smaller PRs unless there is a clear reason the changes need to land together. If keeping it as one PR, please add a brief justification covering:
|
|
Updates to Preview Branch (eng-1906-add-contentcontent_type-and-backfill-rows) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
| Content: { | ||
| Row: { | ||
| author_id: number | null | ||
| content_type: string | null |
There was a problem hiding this comment.
Type mismatch: content_type is defined as string | null in TypeScript types, but the database column is NOT NULL (see migration line 2 and schema line 91). If application code explicitly sets this to null, it will cause a database constraint violation at runtime.
// Should be:
content_type: string
// Instead of:
content_type: string | nullSame issue exists for Document.Row (line 504), and all Insert/Update types for both Content and Document tables. The | null should be removed since the database column has a NOT NULL constraint with a default value.
| content_type: string | null | |
| content_type: string |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
https://linear.app/discourse-graphs/issue/ENG-1906/add-contentcontent-type-and-backfill-rows