Skip to content

Commit

Permalink
Add migrations (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
neoxelox authored Nov 12, 2024
1 parent 05f16d6 commit bbc46d6
Show file tree
Hide file tree
Showing 3 changed files with 3,321 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/core/drizzle/0099_even_justin_hammer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ALTER TABLE "latitude"."workspaces" ADD COLUMN "default_provider_id" bigint;--> statement-breakpoint
ALTER TABLE "latitude"."provider_api_keys" ADD COLUMN "default_model" varchar;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "latitude"."workspaces" ADD CONSTRAINT "workspaces_default_provider_id_provider_api_keys_id_fk" FOREIGN KEY ("default_provider_id") REFERENCES "latitude"."provider_api_keys"("id") ON DELETE set null ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
Loading

0 comments on commit bbc46d6

Please sign in to comment.