Format#
History (from migrations in the repo)#
000083_feedback_source_profile_name#
feedback_submissions.source_workspace_name→source_profile_name- Completes the 000079 workspace → profile rename. Seed and GORM already write the new name
- Local migrate-up applied 2026-09-13 (82 → 83). Additive rename.
000082_organization_teams#
organization_teams,organization_team_members,profile_team_assignmentsprofile_members.origin:direct|team(defaultdirect)- Assign Team → Studio upserts
profile_members. Unassign removes team-only rows - Written, not applied. SQL written is not a schema applied.
000080_profile_visibility#
visibilityonprofiles:private|public(defaultprivate)- Public
/@handleand/api/p/:handlereturn 404 unless the viewer is a member PATCH /api/profiles/{profileId}acceptsvisibility- Local migrate-up applied 2026-09-10 (79 → 80). Additive.
000079_workspace_to_profile#
- Renames tenancy:
workspaces→profiles,workspace_members→profile_members, columnworkspace_id→profile_id - API:
/api/profiles,/api/{domain}/profiles/:profileId, public/api/p/:handle - Team app:
/profiles/:handle. Browser/@handleunchanged. API stays/api/profiles/:profileId - Written, not applied. SQL written is not a schema applied.
000078_meal_log_share_visibility#
visibilityonnutrition_meal_logs:members|followers|public(defaultmembers)- API:
GET /profiles/{handle}/meals,GET .../meals/{dateKey} - Local migrate-up applied 2026-09-10 (75 → 78). Additive.
000077_goals_share_visibility#
visibilityongoalsonly (no vision boards)- API:
GET /profiles/{handle}/goals,GET .../goals/{goalId} - Local migrate-up applied 2026-09-10 (75 → 78). Additive.
000076_library_share_visibility#
visibilityonlibrary_itemsandlibrary_collections:members|followers|public(defaultmembers)- API:
GET /profiles/{handle}/library,GET .../library/{itemId},GET .../collections,GET .../collections/{collectionId} - Local migrate-up applied 2026-09-10 (75 → 78). Additive.
000075_domain_places#
- Nullable
place_idon library items, reminders, health routines/sessions, nutrition shopping collections and meal logs, tasks, week-plan items, finance transactions and recurring rules, goals, goal milestones, and activities - Health sessions may also store
route_geojson - Nutrition pantry
locationis unchanged
000074_places#
placestable: profile-scoped name, optional address, lat/lng, providermanual|url- API: CRUD under
/places/workspaces/{workspaceId}/places - Product
place_idFKs land in000075. Not a Travel app.
000073_profile_follows_nutrition_visibility#
workspaces.handle(unique while active),kind(person|organization),bioprofile_follows(follower_user_id,profile_id)visibilityonnutrition_recipesandnutrition_meal_plans:members|followers|public(defaultmembers)- API: public profile reads and follow under
/profiles/{handle}
000068_entitlement_v2_usage_accounts#
workspaces.entitlement_version(1|2, default2)agent_usage_accountskeyed by(scope_kind, scope_id)for Free-owner pooling and paid profile balancesagent_credit_reservations.usage_account_id- v2 text limits: Free 100 / owner, Pro 500 / profile, Business 2,000 / profile
- API:
AgentCreditBalanceaddsentitlementVersionandbillingScopeKind
000065_drop_redundant_indexes#
- Drop left-prefix indexes covered by a wider index with the same
deleted_at IS NULLpredicate idx_nutrition_meal_logs_workspace→idx_nutrition_meal_logs_workspace_date_keyidx_week_plans_workspace→ uniqueidx_week_plans_workspace_week_activeidx_workspace_tags_workspaceandidx_workspace_tags_scope→ uniqueidx_workspace_tags_active_name- Does not drop unused tables or unused-but-not-redundant indexes
000064_finance_coherence#
savings_goal_idonfinance_transactionsandfinance_recurring_rules- Partial unique
(workspace_id, transaction_id)onfinance_savings_contributions - Nullable
currencyon budgets, savings goals, and planner scenarios, backfilled from the primary or linked account - Daily profile/tag summaries are keyed by currency (blank = unknown). Rebuilt from the ledger
- API: savings-linked income is atomic with the contribution; aggregates stay currency-scoped
000063_document_schema_version#
schema_version SMALLINT NOT NULL DEFAULT 1 CHECK (schema_version > 0)ontask_documentsandnote_documents- Existing rows adopt schema version 1 without rewriting
content_json - Editing concurrency stays on
version; JSON compatibility usesschema_version
000061_better_auth_account_issuer#
account.issuerTEXT NOT NULL, unique withaccountId- Better Auth 1.6+ looks up email/password as
providerId=credential+issuer=local:credential+accountId=user.id - Seed writes the same issuer so
seed@agata.localcan sign in
000059_purge_orphan_project_links#
- Deletes
workspace_project_linksrows whose linked entity no longer exists (and, for entities without a restore flow, rows whose entity is soft-deleted) - API: modules now clear project links when they delete a linkable entity, and
ListProjectLinkshides links it cannot resolve instead of rendering the raw entity id
000058_vision_boards#
- Tables
vision_boards,vision_board_items,vision_board_goal_links - API: CRUD under
/goals/workspaces/:id/vision-boards - UI: Vision board tab in Goals
000057_goal_images#
- Table
goal_images(same blob pattern asactivity_images) - API: attach via
POST /blob/.../attachmentswithdomain=goals;DELETE /goals/.../:goalId/images/:imageId primaryImageon goals list/detail
000056_drop_activity_project_links#
- Deletes
workspace_project_linkswhereentity_type = activity - Activities can no longer belong to a project
000055_workspace_member_favorite#
workspace_members.is_favorite(BOOLEAN, default false): personal favorite per membership- API:
isFavoriteonGET /workspacesandPOST /workspaces/:id/favorite
000054_week_plan_series_start#
week_plan_series.starts_on_week_start_date_key(Monday of the week Repeat was turned on)POST /series/ensuredoes not create items in previous weeks. The migration deletes already-materialized leaks
000053_week_plan_activity_link#
week_plan_items.source_activity_idandweek_plan_series.source_activity_id→activities- XOR with
source_task_id. Weekly occurrences inherit the habit from the series
000052_week_plan_later#
week_plan_items.date_keybecomes nullable- NULL = Later item for that week (no day). Does not appear in Calendar
000051_week_plan_series#
- Table
week_plan_series(title, notes, weekday 0–6) andweek_plan_items.series_id - Unique
(series_id, date_key)includes soft-deleted rows so a deleted occurrence is not rematerialized - API:
repeatWeekly/stopRepeatingon items andPOST /series/ensure
000050_drop_unused_redundant_indexes#
- Drop
idx_goals_workspace(left-prefix ofidx_goals_workspace_user_updated) - Drop
idx_eve_chat_events_chat(left-prefix of uniqueidx_eve_chat_events_chat_index) - Drop
idx_finance_accounts_workspaceif present (GORM leftover; covered byidx_finance_accounts_workspace_archived). Does not touchidx_finance_accounts_primary.
000046_billing_pending_plan#
workspaces.billing_pending_plan/billing_pending_intervalfor the target of a Subscription Schedule- Use: impact preview and billing strips while the current plan stays active until renewal
000044_week_plan#
- Tables
week_plans+week_plan_items(Mon–Sun plan per profile) - Partial unique
(workspace_id, week_start_date_key)when active; items by(plan_id, date_key, sort_order) - API domain
/week-plan; distinct from Nutrition meal plans
000043_drop_eve_proactive#
- Drop
eve_proactive_deliveriesandeve_proactive_settings - Purge
scheduled_notificationswithdomain = 'agent' - Delete dedicated chats
eve-proactive-%
000040_eve_proactive_last_read#
- Historical:
eve_proactive_settings.last_read_at(retired in000043)
000039_eve_privacy_memory_proactive#
eve_chats.visibility(private|workspace); existing →workspace; new defaultprivate- FK
eve_chats.user_id→ Better Auth"user"(id)(resolvable author) eve_chat_share_eventsfor share/privatize audit- Foundations:
eve_user_memories(proactive tables created here and retired in000043)
000036_finance_debt_account_detail#
finance_debts.settled_at(debt settlement) + index(workspace_id, settled_at)finance_accounts.statement_day,is_primary(partial unique per workspace) andmask_last4- Debt payments index reordered to
(debt_id, occurred_at DESC)
000035_finance_debt_savings_account#
finance_debts.account_idandfinance_savings_goals.account_id(optional FK tofinance_accounts)- Debt payments / savings contributions create ledger transactions (
expense/income) and linktransaction_id
000033_qstash_delivery#
- Publish, deduplication, and QStash error metadata on
scheduled_notificationsandmetronome_outbox_events - Backfill of one delivery generation for pending rows
- Partial indexes to recover pending work without a published message
000032_finance_budget_name#
finance_budgets.name(TEXT NOT NULL, default'')- Backfill from
workspace_tags.namewhen there is atag_id - Budget upsert requires a name; the UI can autocomplete it from the tag
000023_normalize_shared_links#
- Normalizes legacy financial tag links (
transaction/recurring_rule) tofinance_transaction/finance_recurring_rule - Migrates
pomodoro_timers.linked_project_idtoworkspace_project_linkswithentity_type = pomodoro_timer
000012_eve_chat#
- Drop
agent_conversations/agent_messages - Tables
eve_chats/eve_chat_events(Eve persistence, written from Next)
000011_agent#
- Tables
agent_conversationsandagent_messagesfor Agent chat (beta) — replaced by000012
000010_finance_debt_groups#
- New table
finance_debt_groups finance_debts.group_idoptional FK
000009_scheduled_notifications#
- Unified scheduled-notifications queue with
idempotency_key
000007_finance#
- Full finance schema (accounts, tx, budgets, debts, savings, summaries)
000006_notebook#
- Notes + versioned documents + images
000005_domains#
- Goals, pomodoro, activities, reminders, library, health, nutrition
000004_tasks#
- Tasks + documents + comments/subtasks/images +
task_counttriggers
000003_platform#
- Blobs, tags, projects, project feed
000002_better_auth#
- camelCase auth tables
000001_platform_core#
- Users, workspaces, members, feedback, audit, billing audit
2026-07-17 — docs#
- Layout documented as a single
postgresdatabase (no multi-app logical DBs in the cluster).
2026-07-15 — docs#
- Database tab expanded with columns by domain and conventions.