Skip to content

chore(migraties): migratiemap verhuist naar ribbaPro - #56

Merged
onder-ates merged 1 commit into
mainfrom
chore/migraties-naar-ribbapro
Aug 10, 2026
Merged

chore(migraties): migratiemap verhuist naar ribbaPro#56
onder-ates merged 1 commit into
mainfrom
chore/migraties-naar-ribbapro

Conversation

@onder-ates

@onder-ates onder-ates commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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 in ribbaPro/supabase/migrations/, met dezelfde versie en naam.
  • Verwijzingen naar migratiebestanden wijzen naar ribbaPro: docs/ARCHITECTUUR.md, docs/REFERRAL-PROGRAMMA.md, en de commentaarkoppen van lib/marketplace-types.ts, lib/referral-types.ts, lib/referral-attribution.ts.
  • docs/ARCHITECTUUR.md krijgt onder «Supabase — gedeelde database» twee nieuwe stukken: de eigenaarschapsregel, en de pg_cron-trigger voor chat-notifications met 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 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 kost dat get_chat_context zijn 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

    • Clarified that database migrations are maintained in the ribbaPro repository.
    • Added operational guidance for chat notifications, including scheduling, secure configuration, and recovery steps.
    • Updated marketplace and referral documentation references.
  • Backend Changes

    • Removed marketplace, referral-program, support-portal, and related migration definitions from this repository.
    • Updated references to reflect the new migration location.

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>
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ribba-pro Ready Ready Preview Aug 10, 2026 11:36am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This change removes Supabase migrations from this repository, updates migration references to ribbaPro, and documents the external migration ownership and chat-notification configuration.

Changes

Migration ownership relocation

Layer / File(s) Summary
Migration boundary and database setup
docs/ARCHITECTUUR.md, supabase/migrations/*
The architecture documentation assigns database migrations to ribbaPro. Marketplace, referral, and support-related migration files were removed from this repository. Chat notifications are documented as Supabase pg_cron and pg_net calls using a Vault secret.
Migration reference alignment
docs/REFERRAL-PROGRAMMA.md, lib/marketplace-types.ts, lib/referral-attribution.ts, lib/referral-types.ts
Documentation and source comments now reference migration files under ribbaPro. Executable logic and type declarations are unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: melvinmt

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed De titel beschrijft duidelijk de hoofdwijziging: de Supabase-migratiemap verhuist van deze repository naar ribbaPro.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migraties-naar-ribbapro

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/ARCHITECTUUR.md (2)

118-124: 🗄️ Data Integrity & Integration | 🔵 Trivial | 🏗️ Heavy lift

Gate this change on PolderLabs/ribbaPro#432.

This branch removes the local migration source and depends on ribbaPro for all migrations. Verify that PolderLabs/ribbaPro#432 is 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 win

Document 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 in cron.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

📥 Commits

Reviewing files that changed from the base of the PR and between 2f23b15 and 6e05f81.

📒 Files selected for processing (21)
  • docs/ARCHITECTUUR.md
  • docs/REFERRAL-PROGRAMMA.md
  • lib/marketplace-types.ts
  • lib/referral-attribution.ts
  • lib/referral-types.ts
  • supabase/migrations/20260711000000_marketplace_mvp.sql
  • supabase/migrations/20260718000000_marketplace_review_fixes.sql
  • supabase/migrations/20260719000000_chat_context_opleidingsvoorkeur.sql
  • supabase/migrations/20260721170000_merge_get_chat_context.sql
  • supabase/migrations/20260729000000_referral_program.sql
  • supabase/migrations/20260729120000_referral_mark_milestone_service_role.sql
  • supabase/migrations/20260729130000_referral_rpc_anon_revoke.sql
  • supabase/migrations/20260730100000_referral_adopt_billing_mandate.sql
  • supabase/migrations/20260803100000_drivingschools_signup_attribution.sql
  • supabase/migrations/20260803120000_support_portaal_fundament.sql
  • supabase/migrations/20260803140000_support_interne_scholen_en_activiteit.sql
  • supabase/migrations/20260803160000_support_schooldetail.sql
  • supabase/migrations/20260803180000_support_cbr_koppeling_status.sql
  • supabase/migrations/20260803220000_support_eerste_acceptatie.sql
  • supabase/migrations/20260805010000_support_lijst_gelijk_aan_app.sql
  • supabase/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

Comment thread docs/ARCHITECTUUR.md
- `/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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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-L62
  • docs/REFERRAL-PROGRAMMA.md#L116-L116
  • lib/marketplace-types.ts#L2-L2
  • lib/referral-attribution.ts#L6-L6
  • lib/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.

@onder-ates
onder-ates merged commit 909ce5e into main Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant