mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-26 09:35:29 +02:00
- Modified the apikey table to drop the user_id column and replace it with reference_id, establishing a foreign key relationship with the user table. - Added config_id column with a default value to the apikey table. - Updated related code in the account schema and user service to reflect these changes. - Enhanced the journal and snapshot files to include the latest schema updates.
6 lines
425 B
SQL
6 lines
425 B
SQL
ALTER TABLE "apikey" ALTER COLUMN "user_id" DROP NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "apikey" ADD COLUMN "config_id" text DEFAULT 'default' NOT NULL;--> statement-breakpoint
|
|
ALTER TABLE "apikey" ADD COLUMN "reference_id" text;--> statement-breakpoint
|
|
UPDATE "apikey" SET "reference_id" = "user_id" WHERE "reference_id" IS NULL;--> statement-breakpoint
|
|
ALTER TABLE "apikey" ALTER COLUMN "reference_id" SET NOT NULL;
|