mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
remove: delete migration script and associated journal entries for 0093_elite_warlock
This commit removes the migration script for adding a userId column to the git_provider table, along with its corresponding journal entries. The migration was deemed unnecessary following recent changes to the handling of existing git providers.
This commit is contained in:
parent
3e05be4513
commit
96b4c334da
@ -1,21 +0,0 @@
|
||||
-- Add the userId column as nullable first
|
||||
ALTER TABLE "git_provider" ADD COLUMN "userId" text;--> statement-breakpoint
|
||||
|
||||
-- Add the unique constraint on account.user_id first (needed for foreign key)
|
||||
ALTER TABLE "account" ADD CONSTRAINT "account_user_id_unique" UNIQUE("user_id");--> statement-breakpoint
|
||||
|
||||
-- Update existing git providers to be owned by the organization owner
|
||||
-- We need to get the account.user_id for the organization owner
|
||||
UPDATE "git_provider"
|
||||
SET "userId" = (
|
||||
SELECT a.user_id
|
||||
FROM "organization" o
|
||||
JOIN "account" a ON o."owner_id" = a.user_id
|
||||
WHERE o.id = "git_provider"."organizationId"
|
||||
);--> statement-breakpoint
|
||||
|
||||
-- Now make the column NOT NULL since all rows should have values
|
||||
ALTER TABLE "git_provider" ALTER COLUMN "userId" SET NOT NULL;--> statement-breakpoint
|
||||
|
||||
-- Add the foreign key constraint (after unique constraint exists)
|
||||
ALTER TABLE "git_provider" ADD CONSTRAINT "git_provider_userId_account_user_id_fk" FOREIGN KEY ("userId") REFERENCES "public"."account"("user_id") ON DELETE cascade ON UPDATE no action;
|
File diff suppressed because it is too large
Load Diff
@ -652,13 +652,6 @@
|
||||
"when": 1747713229160,
|
||||
"tag": "0092_stiff_the_watchers",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 93,
|
||||
"version": "7",
|
||||
"when": 1748644790490,
|
||||
"tag": "0093_elite_warlock",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user