-
Notifications
You must be signed in to change notification settings - Fork 84
fix: resolve migration issue for oidv_issuer schema modal #1610
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
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,6 @@ | ||||||||||||||||||||||||||||||||||
| -- AlterTable | ||||||||||||||||||||||||||||||||||
| ALTER TABLE "oidc_issuer" ADD COLUMN "isPrimary" BOOLEAN NOT NULL DEFAULT false, | ||||||||||||||||||||||||||||||||||
| ADD COLUMN "orgId" UUID; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| -- AddForeignKey | ||||||||||||||||||||||||||||||||||
| ALTER TABLE "oidc_issuer" ADD CONSTRAINT "oidc_issuer_orgId_fkey" FOREIGN KEY ("orgId") REFERENCES "organisation"("id") ON DELETE SET NULL ON UPDATE CASCADE; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+2
to
+6
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. Backfill Line 595 in Suggested migration patch -- AlterTable
ALTER TABLE "oidc_issuer" ADD COLUMN "isPrimary" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "orgId" UUID;
+UPDATE "oidc_issuer" AS oi
+SET "orgId" = oa."orgId"
+FROM "org_agents" AS oa
+WHERE oa."id" = oi."orgAgentId"
+ AND oi."orgId" IS NULL;
+
-- AddForeignKey
ALTER TABLE "oidc_issuer" ADD CONSTRAINT "oidc_issuer_orgId_fkey" FOREIGN KEY ("orgId") REFERENCES "organisation"("id") ON DELETE SET NULL ON UPDATE CASCADE;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: credebl/platform
Length of output: 305
🏁 Script executed:
Repository: credebl/platform
Length of output: 546
🏁 Script executed:
Repository: credebl/platform
Length of output: 450
🏁 Script executed:
Repository: credebl/platform
Length of output: 50372
🏁 Script executed:
Repository: credebl/platform
Length of output: 5304
🏁 Script executed:
Repository: credebl/platform
Length of output: 2172
Restore the April migration and keep it immutable.
The April migration (20260427080006) was created in commit f95dcd3 with essential schema changes to both
oidc_issuerandoid4vc_credentialstables. The "fix: resolve migration issue" commit deleted it entirely and created a May migration containing only a subset of those changes. This creates two critical issues:oid4vc_credentialsandissued_oid4vc_credentialsforeign key updates from the original April migration.Restore the April migration exactly as it existed in f95dcd3 and ship only this May migration as an additive follow-up if needed.
🤖 Prompt for AI Agents