operations

Running the Notebooks Migration

The error you're seeing means the notebooks table hasn't been created yet. Follow these steps:

Quick Fix

  1. Go to your Supabase Dashboard

  2. Open SQL Editor

    • Click on "SQL Editor" in the left sidebar
    • Click "New query"
  3. Run the Migration

    • Copy the entire contents of supabase/migrations/002_add_notebooks.sql
    • Paste it into the SQL Editor
    • Click "Run" (or press Cmd/Ctrl + Enter)
  4. Verify

    • Go to "Table Editor" in Supabase
    • You should now see a notebooks table
    • The journal_entries table should have a notebook_id column

What the Migration Does

  • Creates the notebooks table
  • Adds notebook_id column to journal_entries
  • Sets up indexes for performance
  • Configures Row Level Security (RLS) policies
  • Creates triggers for updated_at timestamps

After running this, try creating a notebook again - it should work!

MIGRATION INSTRUCTIONS — Docs | HiveJournal