heaventree adds a full Supabase migration file upstream had never shipped

heaventree/mike lands a 389-line SQL migration covering the complete Mike data model - something the upstream willchen96/mike never published. If you're deploying on Supabase, this is the only authored migration in the fork ecosystem that gets you from zero to a working schema.

infrastructuresecurity

The migration (supabase/migrations/20260519201745_initial_schema.sql) defines 16 tables spanning the full application surface: user_profiles, user_api_keys with AES-GCM columns (encrypted_key, iv, auth_tag) for per-user Claude/Gemini/OpenAI keys, projects and project_subfolders, documents with document_versions and document_edits, workflows with sharing and hidden-list tables, chats and chat_messages, and the tabular review hierarchy (tabular_reviews, tabular_cells, tabular_review_chats, tabular_review_chat_messages). Direct grants to anon and authenticated roles are revoked; all writes go through the backend service role. An on_auth_user_created trigger auto-inserts a user_profiles row on Supabase signup, with an exception-swallowing handler so a seed failure never blocks the auth flow.

Two things are worth scrutinising before importing. First, projects.user_id is typed as text, not uuid references auth.users(id) - a deliberate looseness that could let bad data slip in if your backend doesn't enforce the constraint. Second, the tabular_model default on user_profiles is gemini-3-flash-preview; check that against whatever model slug your own backend resolves as default.

The same commit also sets "license": "AGPL-3.0-only" in frontend/package-lock.json and swaps the favicon for a 1150-byte custom one. Neither affects the schema, but they signal heaventree is treating this as their own product build.

So what Worth a look if you're targeting Supabase and want a head-start on provisioning - this is the most complete schema artefact in the wider fork set. Review `projects.user_id text` vs your expected `uuid` type and verify the `tabular_model` default before running it.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from heaventree/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
d3c0554b Updated package-lock.json Heaventree Digital 2026-05-20 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-515.md from inside the repo you want the changes in.

⬇ Download capture-thread-515.md