-
Notifications
You must be signed in to change notification settings - Fork 732
feat: enable maintainers processing for all git, github, and gitlab repos instead of github only (CM-773) #3594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| -- Migration to remove the foreign key constraint from maintainersInternal.repoId to githubRepos.id | ||
| -- This removes the dependency on githubRepos table and creates the new reference to git.repositories table | ||
|
|
||
| ALTER TABLE "maintainersInternal" | ||
| DROP CONSTRAINT IF EXISTS "maintainersInternal_repoId_fkey"; | ||
|
|
||
| ALTER TABLE "maintainersInternal" | ||
| ADD CONSTRAINT "maintainersInternal_repoId_fkey" | ||
| FOREIGN KEY ("repoId") | ||
| REFERENCES git.repositories(id) | ||
| ON DELETE CASCADE; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Materialized View Breaks Maintainer ProcessingThe migration changes |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Foreign Key Migration Requires Data Synchronization
The migration adds a foreign key constraint referencing
git.repositories(id)without ensuring allrepoIdvalues inmaintainersInternalexist ingit.repositories. If any maintainer records reference repos that haven't been synced fromgithubRepostogit.repositoriesyet, the constraint addition will fail with a foreign key violation. The migration needs a preceding data migration to populategit.repositorieswith all repos currently referenced bymaintainersInternalbefore changing the constraint.