Skip to content

chore: implement migration drift detection, CI rules, and duplicate c…#787

Open
VictorEzenma wants to merge 4 commits into
Calebux:mainfrom
VictorEzenma:chore/migration-cleanup-and-ci
Open

chore: implement migration drift detection, CI rules, and duplicate c…#787
VictorEzenma wants to merge 4 commits into
Calebux:mainfrom
VictorEzenma:chore/migration-cleanup-and-ci

Conversation

@VictorEzenma
Copy link
Copy Markdown

…leanup

closes #423

Description

This PR implements automated drift detection and strict ownership rules for our database migrations to prevent schemas from silently diverging between backend/migrations/ and supabase/migrations/.

Key changes include:

  • Defined Ownership Rules: Updated CONTRIBUTING.md to clearly define domain ownership (Core/Frontend vs. Backend) and establish a unified 5-step migration workflow.
  • Added CI Check: Created a GitHub Actions workflow (.github/workflows/migration-drift-check.yml) that runs the drift detection script automatically on pull requests to block duplicates or conflicts.
  • Duplicate Cleanup: Added a cleanup:migrations command to package.json and removed the 4 known redundant backend migrations (create_audit_logs.sql, create_renewal_tables.sql, create_team_invitations.sql, add_pause_columns.sql) to establish a clean slate for the CI.

Related Issue


Test Plan

  • Tested locally
  • Verified expected behavior
  • No regressions introduced

Screenshots (if applicable)

(N/A - Infrastructure and CI changes only)


Checklist

  • Code builds successfully
  • Tests pass
  • Follows project conventions
  • No sensitive data exposed

Checklist

  • Code builds successfully
  • Tests pass
  • Follows project conventions
  • No sensitive data exposed

@VictorEzenma VictorEzenma requested a review from Calebux as a code owner June 1, 2026 03:40
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@VictorEzenma Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add migration drift check between backend and supabase migration folders

2 participants