Skip to content

ENG-1906 Add Content.content_type and backfill rows#1154

Open
maparent wants to merge 4 commits into
mainfrom
eng-1906-add-contentcontent_type-and-backfill-rows
Open

ENG-1906 Add Content.content_type and backfill rows#1154
maparent wants to merge 4 commits into
mainfrom
eng-1906-add-contentcontent_type-and-backfill-rows

Conversation

@maparent

@maparent maparent commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview, Comment Jun 23, 2026 9:58pm

Request Review

@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

ENG-1906

@graphite-app

graphite-app Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

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:

  • What single problem this PR solves
  • Why the files/changes are coupled

@supabase

supabase Bot commented Jun 23, 2026

Copy link
Copy Markdown

Updates to Preview Branch (eng-1906-add-contentcontent_type-and-backfill-rows) ↗︎

Deployments Status Updated
Database Tue, 23 Jun 2026 21:57:22 UTC
Services Tue, 23 Jun 2026 21:57:22 UTC
APIs Tue, 23 Jun 2026 21:57:22 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Tue, 23 Jun 2026 21:57:22 UTC
Migrations Tue, 23 Jun 2026 21:57:23 UTC
Seeding Tue, 23 Jun 2026 21:57:23 UTC
Edge Functions Tue, 23 Jun 2026 21:57:26 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 potential issues.

Open in Devin Review

Comment thread packages/database/supabase/schemas/content.sql
Comment thread packages/database/supabase/migrations/20260623144039_content_type_column.sql Outdated
Comment thread packages/database/supabase/migrations/20260623144039_content_type_column.sql Outdated
Comment thread packages/database/supabase/schemas/content.sql Outdated
Content: {
Row: {
author_id: number | null
content_type: string | null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | null

Same 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.

Suggested change
content_type: string | null
content_type: string

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant