Deploying the database
Safely apply Claire schema changes and reload the API schema cache.
Apply the migrations in supabase/migrations/ to a local Docker stack or your own Supabase project. They are timestamp-prefixed and must be applied in lexical order.
Applying migrations#
bunx supabase login
bunx supabase link --project-ref <your-project-ref>
bunx supabase db pushOpen your project dashboard, open the SQL Editor, and run each file in supabase/migrations/ in timestamp order.
psql "$DATABASE_URL" -f supabase/migrations/20250806092049_initial_schema.sqlLocal development#
bun run docker:supabase
bunx supabase db resetVerify#
Confirm these tables exist:
users,contacts,chats,messagesai_suggestions,loops,contact_inferencesuser_preferences,auto_reply_rules
Then reload the PostgREST schema cache so the API sees the new shape immediately:
docker exec supabase-db psql -U postgres -d postgres -c "NOTIFY pgrst, 'reload schema';"