Skip to content

Commit

Permalink
fix: Migrations (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyblasczyk authored Dec 9, 2024
1 parent 5c10d81 commit de5cf4a
Show file tree
Hide file tree
Showing 3 changed files with 4,397 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/db/drizzle/0045_lame_dreadnoughts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS "resource_provider_aws" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"resource_provider_id" uuid NOT NULL,
"aws_role_arns" text[] NOT NULL
);
--> statement-breakpoint
ALTER TABLE "workspace" ADD COLUMN "aws_role_arn" text;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "resource_provider_aws" ADD CONSTRAINT "resource_provider_aws_resource_provider_id_resource_provider_id_fk" FOREIGN KEY ("resource_provider_id") REFERENCES "public"."resource_provider"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
Loading

0 comments on commit de5cf4a

Please sign in to comment.