From 8491f560909f5e558bf4b990786b374434c93323 Mon Sep 17 00:00:00 2001 From: drewyd Date: Tue, 26 May 2026 17:18:07 +1000 Subject: [PATCH] [schemas] Document workflow-status prerequisite for enhanced-thoughts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The enhanced-thoughts schema's upsert_thought function writes to the status and status_updated_at columns on the thoughts table (schema.sql lines 347-383), but those columns are created by the workflow-status schema. Applying enhanced-thoughts on a fresh install without first applying workflow-status fails with: column "status" of relation "thoughts" does not exist Adds a clearly placed Prerequisites callout near the top of the enhanced-thoughts README pointing to the workflow-status schema as a hard dependency. No code or SQL changes — docs only. Caught during a 5-schema install on 2026-05-26. Co-Authored-By: Claude Opus 4.7 (1M context) --- schemas/enhanced-thoughts/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schemas/enhanced-thoughts/README.md b/schemas/enhanced-thoughts/README.md index 5e1c69b9..863d9f01 100644 --- a/schemas/enhanced-thoughts/README.md +++ b/schemas/enhanced-thoughts/README.md @@ -12,8 +12,12 @@ This schema extension adds six new columns to the `thoughts` table (`type`, `sen ## Prerequisites +> [!IMPORTANT] +> **Apply the [`workflow-status`](../workflow-status/) schema first.** This migration's `upsert_thought` function writes to the `status` and `status_updated_at` columns on the `thoughts` table (see `schema.sql` lines 347-383). Those columns are created by the `workflow-status` schema. If you run this migration on a fresh install without `workflow-status` applied, the `CREATE OR REPLACE FUNCTION upsert_thought` block will fail with `column "status" of relation "thoughts" does not exist`. + - Working Open Brain setup (see the getting-started guide in `docs/01-getting-started.md`) - Supabase project with the `thoughts` table, `match_thoughts` function, and `upsert_thought` function already created +- [`workflow-status`](../workflow-status/) schema already applied (adds the `status` and `status_updated_at` columns this migration writes to) ## Credential Tracker