Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

ALTER TABLE "maintainersInternal"
DROP CONSTRAINT IF EXISTS "maintainersInternal_repoId_fkey";

ALTER TABLE "maintainersInternal"
ADD CONSTRAINT "maintainersInternal_repoId_fkey"
FOREIGN KEY ("repoId")
REFERENCES repositories(id)
ON DELETE CASCADE;
Comment on lines +6 to +9
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This migration uses REFERENCES repositories(id) without a schema qualifier, while other migrations in this repo typically qualify (e.g., REFERENCES git.repositories(id) in V1762938833__migrateMaintainersRepoReferenceToGitRepositories.sql and REFERENCES public.repositories(id) in V1766669430__createGitRepositoryProcessingTable.sql). Prefer public.repositories(id) here for consistency and to avoid relying on search_path.

Copilot uses AI. Check for mistakes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Drop the existing foreign key constraint to git.repositories
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Migration filename contains a typo: "Refrenece". Renaming to "Reference" will improve clarity and make it easier to find/search for this migration later.

Copilot uses AI. Check for mistakes.
ALTER TABLE git."serviceExecutions"
DROP CONSTRAINT "serviceExecutions_repoId_fkey";
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

DROP CONSTRAINT is executed without IF EXISTS, which can make the migration fail if the constraint name differs across environments or has already been removed. Consider using DROP CONSTRAINT IF EXISTS ... (as done in V1769092368__changeMaintainersRepoReferenceToRepositories.sql).

Suggested change
DROP CONSTRAINT "serviceExecutions_repoId_fkey";
DROP CONSTRAINT IF EXISTS "serviceExecutions_repoId_fkey";

Copilot uses AI. Check for mistakes.

-- Add new foreign key constraint to public.repositories
ALTER TABLE git."serviceExecutions"
ADD CONSTRAINT "serviceExecutions_repoId_fkey"
FOREIGN KEY ("repoId") REFERENCES public.repositories(id) ON DELETE CASCADE;
102 changes: 0 additions & 102 deletions backend/src/database/repositories/gitReposRepository.ts

This file was deleted.

129 changes: 0 additions & 129 deletions backend/src/database/repositories/githubReposRepository.ts

This file was deleted.

120 changes: 0 additions & 120 deletions backend/src/database/repositories/gitlabReposRepository.ts

This file was deleted.

Loading