You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update the schema-aware-routing README setup SQL so it uses create table if not exists for recipe tables
extend an existing canonical thoughts table with domain, status, and source via alter table ... add column if not exists
add supporting indexes for the recipe-specific thoughts columns and clarify the SQL is safe after the canonical getting-started setup
Why
The current README tells users to create thoughts from scratch. That fails or conflicts for users who already followed the canonical OB1 getting-started SQL. This keeps the recipe aligned with OB1's shared thoughts table contract while preserving the standalone setup path.
Verification
reviewed the README SQL block against docs/01-getting-started.md
rg check for non-idempotent table creation in the edited block
git diff --check
Notes
This PR only updates the setup SQL embedded in the README on current main; it does not add missing scaffold files or new runtime behavior.
Thanks for the contribution. Making the recipe SQL idempotent is the right direction — create table if not exists plus alter ... add column if not exists lets it run cleanly after the canonical OB1 setup.
One thing to resolve before this is ready: the recipe adds status text default 'active' to the shared thoughts table, but schemas/workflow-status already declares status on thoughts as text default null and uses it for kanban-style task/idea state. Since add column if not exists skips when the column is already present, both the default and the meaning of status would depend on which setup ran first. Could you confirm whether this recipe's status is the same concept? If it is, matching default null keeps the two consistent; if it is a distinct routing concept, a different column name would avoid the collision. (domain and source look recipe-specific — no conflict there.)
Minor: the alter ... add column if not exists lines for metadata, created_at, and updated_at duplicate columns the create table block above already declares — worth trimming for clarity.
Recommend author refresh once the status question is settled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create table if not existsfor recipe tablesthoughtstable withdomain,status, andsourceviaalter table ... add column if not existsthoughtscolumns and clarify the SQL is safe after the canonical getting-started setupWhy
The current README tells users to create
thoughtsfrom scratch. That fails or conflicts for users who already followed the canonical OB1 getting-started SQL. This keeps the recipe aligned with OB1's sharedthoughtstable contract while preserving the standalone setup path.Verification
docs/01-getting-started.mdrgcheck for non-idempotent table creation in the edited blockgit diff --checkNotes
This PR only updates the setup SQL embedded in the README on current
main; it does not add missing scaffold files or new runtime behavior.Related to #262.