ENG-2166 upsertConcepts overwrites too aggressively - #1334
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (eng-2166-upsertConcepts-overwrites-too-aggressively) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
|
Updates to Preview Branch (eng-2166-upsertConcepts-overwrites-too-aggressively) ↗︎
Tasks are run on every commit but only new migration files are pushed.
Preview Branch Database Settings ↗︎. |
| -- epistemic_status, literal_content and reference_content are deliberately left out of | ||
| -- the defaults: absent means "leave the stored value alone" on update, and only the | ||
| -- INSERT branch falls back to a default (see the ON CONFLICT clause below). | ||
| local_concept := jsonb_populate_record(NULL::public.concept_local_input, '{"is_schema":false}'); |
There was a problem hiding this comment.
🔴 Schema change ships without a migration
The edits to upsert_concepts live only in the declarative schema file. The documented workflow applies changes to the database through generated files in supabase/migrations/, and none was added. The new behavior never reaches the database and the new feature scenarios, which run against a migrated live database, fail.
Prompt for agents
The declarative schema file packages/database/supabase/schemas/concept.sql was changed (upsert_concepts and _local_concept_to_db_concept) but no corresponding migration was committed under packages/database/supabase/migrations/. Per packages/database/README.md, schema edits must be turned into a migration via `pnpm run dbdiff:save <name>` and committed with `git add`, otherwise the local/CI/branch databases (which apply migrations, not the schema files) will not pick up the change and the new addConcepts.feature scenarios will fail. Generate and commit the migration file for this schema change.
Was this helpful? React with 👍 or 👎 to provide feedback.
https://linear.app/discourse-graphs/issue/ENG-2166/upsertconcepts-overwrites-too-aggressively