feat(git-provider): add userId column to git_provider table and update relationships

- Introduced a new userId column in the git_provider table to associate git providers with users.
- Updated the foreign key reference for userId to point to the users_temp table instead of the account table.
- Modified the UnauthorizedGitProvider component to include a dialog action for disconnecting repositories, enhancing user experience.
- Added a migration script to update existing git providers with the new userId values based on the organization owner.
This commit is contained in:
Mauricio Siu
2025-06-21 20:50:07 -06:00
parent a7b644e403
commit 9686848090
7 changed files with 5780 additions and 16 deletions

View File

@@ -74,11 +74,6 @@ export const bitbucketRouter = createTRPCRouter({
getBitbucketRepositories: protectedProcedure
.input(apiFindOneBitbucket)
.query(async ({ input, ctx }) => {
console.log({
activeOrganizationId: ctx.session.activeOrganizationId,
userId: ctx.session.userId,
bitbucketId: input.bitbucketId,
});
const bitbucketProvider = await findBitbucketById(input.bitbucketId);
if (
bitbucketProvider.gitProvider.organizationId !==