Skip to content

Conversation

@AdaInTheLab
Copy link
Owner

🧬 Key changes

  • New migration helper

    • migrateLabNotesSchema()
    • Uses PRAGMA table_info + ALTER TABLE ADD COLUMN
    • Backfills required defaults for existing rows
    • Rebuilds indexes and views idempotently
  • Preserves core Lab Note attributes

    • Maintains all actively used fields such as:
      • category
      • excerpt
      • department_id
      • shadow_density
      • safer_landing
      • read_time_minutes
    • These remain first-class parts of the data model
  • Lightweight migration logging

    • Logs only when schema changes occur
    • Reports which columns were added
    • Silent on no-op runs
  • Thin bootstrap

    • bootstrapDb now delegates to migration logic
    • Clear separation of responsibilities

Ada and others added 2 commits December 29, 2025 08:22
- Introduce migration helper to safely evolve lab_notes schema
- Preserve existing data while adding translation-ready fields
- Keep Lab Note attributes (category, excerpt, etc.)
- Add lightweight migration logging (added columns only)
- Make bootstrapDb thin and declarative

co-authored-by: Lyric <lyric@thehumanpatternlab.com>
co-authored-by: Carmel <carmel@thehumanpatternlab.com>
- Introduce migration helper to safely evolve lab_notes schema
- Preserve existing data while adding translation-ready fields
- Keep Lab Note attributes (category, excerpt, etc.)
- Add lightweight migration logging (added columns only)
- Make bootstrapDb thin and declarative

co-authored-by: Lyric <lyric@thehumanpatternlab.com>
co-authored-by: Carmel <carmel@thehumanpatternlab.com>
@AdaInTheLab AdaInTheLab merged commit 64c337f into main Dec 29, 2025
1 check passed
@AdaInTheLab AdaInTheLab deleted the scms/db-schema-migration-lab-notes branch December 29, 2025 13:37
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.

2 participants