reconnect option to connect diff account

This commit is contained in:
Vikhyath Mondreti
2026-02-13 12:12:56 -08:00
parent dcf40be189
commit fa32b9e687
7 changed files with 259 additions and 48 deletions

View File

@@ -273,4 +273,6 @@ SELECT
FROM "credential" c
WHERE c.type = 'env_personal'::"credential_type"
AND c.env_owner_user_id IS NOT NULL
ON CONFLICT DO NOTHING;
ON CONFLICT DO NOTHING;
--> statement-breakpoint
ALTER TABLE "pending_credential_draft" ADD COLUMN IF NOT EXISTS "credential_id" text REFERENCES "credential"("id") ON DELETE CASCADE;

View File

@@ -2109,6 +2109,7 @@ export const pendingCredentialDraft = pgTable(
providerId: text('provider_id').notNull(),
displayName: text('display_name').notNull(),
description: text('description'),
credentialId: text('credential_id').references(() => credential.id, { onDelete: 'cascade' }),
expiresAt: timestamp('expires_at').notNull(),
createdAt: timestamp('created_at').notNull().defaultNow(),
},