mebook_sections
Overview
The mebook_sections table defines the top-level sections of the MeBook system. MeBook is a structured self-reflection tool where users answer questions that optionally map to app preferences. Sections group related questions (e.g., "Communication Style", "Social Energy"). This table is seeded by the migration and not user-editable.
Relevant Invariants
- Invariant #19: "Complexity Must Be Earned" -- MeBook sections unlock progressively
Schema
-- From 20260130_mebook_system.sql
CREATE TABLE mebook_sections (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
key TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
description TEXT,
icon TEXT,
sort_order INTEGER DEFAULT 0,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMPTZ DEFAULT NOW()
);
Columns
| Column | Type | Nullable | Default | Description |
|---|---|---|---|---|
id | uuid | No | gen_random_uuid() | Primary key |
key | text | No | -- | Unique section key |
title | text | No | -- | Section display title |
description | text | Yes | -- | Section description |
icon | text | Yes | -- | Section icon identifier |
sort_order | integer | No | 0 | Display order |
is_active | boolean | No | TRUE | Whether section is available |
created_at | timestamptz | No | NOW() | Seed timestamp |
RLS Policies
-- SELECT: All authenticated users can read sections
CREATE POLICY "Sections are readable by all"
ON mebook_sections FOR SELECT
USING (true);
Related
- mebook_questions -- Questions within this section
- mebook_responses -- User answers to section questions
Last updated: 2026-02-07