chore(migraties): migratiemap verhuist naar ribbaPro - #56
Conversation
Deze repo en ribbaPro draaien op dezelfde Supabase-database en schrijven naar dezelfde supabase_migrations.schema_migrations, maar hadden elk een eigen migratiemap. ribbaPro heeft een CI-guard op versie-uniciteit, deze repo niet, en geen van beide keek naar de andere map. Dat is één keer misgegaan op versie 20260721170000: hier merge_get_chat_context, daar join_school. Bij een apply van beide mappen op één database verliest de tweede zijn migratie, en welke dat is hangt aan de volgorde — in de ene richting verliest get_chat_context zijn token-expiry-gate, waarmee verlopen chatlinks zouden blijven werken. Daarom één eigenaar. De 15 migraties staan nu in ribbaPro, met dezelfde versie en naam (ze stonden al zo in de registry, dus er is niets hernoemd) en onder de guard daar. Een databasewijziging vanuit deze repo gaat voortaan via een PR in ribbaPro. De aantekeningen uit de verwijderde README blijven bewaard: de migratiegebonden context is meeverhuisd naar ribbaPro, en wat over de runtime van déze repo gaat — de pg_cron-trigger voor chat-notifications met zijn Vault-secret — staat nu in docs/ARCHITECTUUR.md, waar het thuishoort. De verwijzingen naar migratiebestanden in docs en in de commentaarkoppen van lib/marketplace-types.ts, lib/referral-types.ts en lib/referral-attribution.ts wijzen nu naar ribbaPro. Die twee types-bestanden blijven hier: het project is niet CLI-gelinkt vanuit deze repo, dus geen `supabase gen types`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis change removes Supabase migrations from this repository, updates migration references to ribbaPro, and documents the external migration ownership and chat-notification configuration. ChangesMigration ownership relocation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/ARCHITECTUUR.md (2)
118-124: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy liftGate this change on
PolderLabs/ribbaPro#432.This branch removes the local migration source and depends on
ribbaProfor all migrations. Verify thatPolderLabs/ribbaPro#432is merged before releasing this branch. Also verify that all 15 migration files retain the same versions and names.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/ARCHITECTUUR.md` around lines 118 - 124, Gate release of this branch on the merge of PolderLabs/ribbaPro#432, and verify that all 15 migration files in ribbaPro retain their existing versions and names before release.
150-152: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDocument the Vault secret rotation procedure.
vault.update_secret()expects the secret UUID as its first argument. (supabase.com) This section only gives the secret name. Document the UUID lookup or the Supabase UI procedure. Do not place the secret value incron.job.command.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/ARCHITECTUUR.md` around lines 150 - 152, Update the Vault secret rotation instructions near the cron job guidance to explain how to obtain the secret UUID, either by looking it up or using the Supabase UI, before calling vault.update_secret. Keep the secret value out of cron.job.command and document updating the existing Vault secret rather than embedding credentials in the cron definition.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/ARCHITECTUUR.md`:
- Line 43: Standardize every migration reference to the canonical
repository-qualified path ribbaPro/supabase/migrations/...: update
docs/ARCHITECTUUR.md lines 43-43 and 62-62, docs/REFERRAL-PROGRAMMA.md line
116-116 (also remove its parenthetical repository note),
lib/marketplace-types.ts line 2-2, lib/referral-attribution.ts line 6-6, and
lib/referral-types.ts line 2-2.
---
Nitpick comments:
In `@docs/ARCHITECTUUR.md`:
- Around line 118-124: Gate release of this branch on the merge of
PolderLabs/ribbaPro#432, and verify that all 15 migration files in ribbaPro
retain their existing versions and names before release.
- Around line 150-152: Update the Vault secret rotation instructions near the
cron job guidance to explain how to obtain the secret UUID, either by looking it
up or using the Supabase UI, before calling vault.update_secret. Keep the secret
value out of cron.job.command and document updating the existing Vault secret
rather than embedding credentials in the cron definition.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 781f1ea9-4558-4677-9b2e-4701638cbe9f
📒 Files selected for processing (21)
docs/ARCHITECTUUR.mddocs/REFERRAL-PROGRAMMA.mdlib/marketplace-types.tslib/referral-attribution.tslib/referral-types.tssupabase/migrations/20260711000000_marketplace_mvp.sqlsupabase/migrations/20260718000000_marketplace_review_fixes.sqlsupabase/migrations/20260719000000_chat_context_opleidingsvoorkeur.sqlsupabase/migrations/20260721170000_merge_get_chat_context.sqlsupabase/migrations/20260729000000_referral_program.sqlsupabase/migrations/20260729120000_referral_mark_milestone_service_role.sqlsupabase/migrations/20260729130000_referral_rpc_anon_revoke.sqlsupabase/migrations/20260730100000_referral_adopt_billing_mandate.sqlsupabase/migrations/20260803100000_drivingschools_signup_attribution.sqlsupabase/migrations/20260803120000_support_portaal_fundament.sqlsupabase/migrations/20260803140000_support_interne_scholen_en_activiteit.sqlsupabase/migrations/20260803160000_support_schooldetail.sqlsupabase/migrations/20260803180000_support_cbr_koppeling_status.sqlsupabase/migrations/20260803220000_support_eerste_acceptatie.sqlsupabase/migrations/20260805010000_support_lijst_gelijk_aan_app.sqlsupabase/migrations/README.md
💤 Files with no reviewable changes (16)
- supabase/migrations/20260730100000_referral_adopt_billing_mandate.sql
- supabase/migrations/20260805010000_support_lijst_gelijk_aan_app.sql
- supabase/migrations/20260803100000_drivingschools_signup_attribution.sql
- supabase/migrations/20260803120000_support_portaal_fundament.sql
- supabase/migrations/20260803160000_support_schooldetail.sql
- supabase/migrations/20260721170000_merge_get_chat_context.sql
- supabase/migrations/README.md
- supabase/migrations/20260719000000_chat_context_opleidingsvoorkeur.sql
- supabase/migrations/20260718000000_marketplace_review_fixes.sql
- supabase/migrations/20260803220000_support_eerste_acceptatie.sql
- supabase/migrations/20260729130000_referral_rpc_anon_revoke.sql
- supabase/migrations/20260729000000_referral_program.sql
- supabase/migrations/20260711000000_marketplace_mvp.sql
- supabase/migrations/20260803180000_support_cbr_koppeling_status.sql
- supabase/migrations/20260729120000_referral_mark_milestone_service_role.sql
- supabase/migrations/20260803140000_support_interne_scholen_en_activiteit.sql
| - `/chat/[token]` — geanonimiseerde web-chat gateway met e-mailverificatie (Supabase Auth OTP), realtime via Supabase Realtime | ||
| - `/api/cron/chat-notifications` — reply-notificatie e-mails (gebundeld, beide richtingen) | ||
| - `supabase/migrations/` — schema voor inquiries/conversations/messages/marketplace_profiles | ||
| - `ribbaPro:supabase/migrations/` — schema voor inquiries/conversations/messages/marketplace_profiles |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Standardize all migration references. The changed references use three formats. Use one canonical repository-qualified path, preferably ribbaPro/supabase/migrations/....
docs/ARCHITECTUUR.md#L43-L43: replace the colon-qualified path.docs/ARCHITECTUUR.md#L62-L62: replace the colon-qualified path.docs/REFERRAL-PROGRAMMA.md#L116-L116: replace the unqualified path and parenthetical repository note.lib/marketplace-types.ts#L2-L2: replace the colon-qualified path.lib/referral-attribution.ts#L6-L6: replace the colon-qualified path.lib/referral-types.ts#L2-L2: replace the colon-qualified path.
📍 Affects 5 files
docs/ARCHITECTUUR.md#L43-L43(this comment)docs/ARCHITECTUUR.md#L62-L62docs/REFERRAL-PROGRAMMA.md#L116-L116lib/marketplace-types.ts#L2-L2lib/referral-attribution.ts#L6-L6lib/referral-types.ts#L2-L2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ARCHITECTUUR.md` at line 43, Standardize every migration reference to
the canonical repository-qualified path ribbaPro/supabase/migrations/...: update
docs/ARCHITECTUUR.md lines 43-43 and 62-62, docs/REFERRAL-PROGRAMMA.md line
116-116 (also remove its parenthetical repository note),
lib/marketplace-types.ts line 2-2, lib/referral-attribution.ts line 6-6, and
lib/referral-types.ts line 2-2.
Hoort bij PolderLabs/ribbaPro#432, die de 15 bestanden daar toevoegt. Merge die eerst — anders staan de migraties even nergens.
Wat
supabase/verdwijnt uit deze repo (15.sql+ de README). De bestanden staan nu inribbaPro/supabase/migrations/, met dezelfde versie en naam.docs/ARCHITECTUUR.md,docs/REFERRAL-PROGRAMMA.md, en de commentaarkoppen vanlib/marketplace-types.ts,lib/referral-types.ts,lib/referral-attribution.ts.docs/ARCHITECTUUR.mdkrijgt onder «Supabase — gedeelde database» twee nieuwe stukken: de eigenaarschapsregel, en de pg_cron-trigger voorchat-notificationsmet zijn Vault-secret (die stond in de verwijderde README en gaat over de runtime van déze repo, niet over migraties).De handgeschreven row-types blijven hier. Het project is niet CLI-gelinkt vanuit deze repo, dus geen
supabase gen types; ze moeten in sync blijven met de migratie in ribbaPro.Waarom
Beide repo's draaien op dezelfde Supabase-database en schrijven naar dezelfde
supabase_migrations.schema_migrations. ribbaPro heeft een CI-guard op versie-uniciteit, deze repo niet, en geen van beide keek naar de andere map. Dat is één keer misgegaan op versie20260721170000: hiermerge_get_chat_context, daarjoin_school.Bij een apply van beide mappen op één database verliest de tweede zijn migratie, en welke dat is hangt aan de volgorde. In de ene richting kost dat
get_chat_contextzijn token-expiry-gate — dan blijven verlopen of gelekte chatlinks werken.Geen gedragswijziging
Alleen bestanden verplaatsen en documentatie. Geen runtime-code geraakt, geen productie-actie: de 15 migraties zijn allemaal al toegepast en staan met dezelfde versie én naam in de registry.
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Backend Changes