Skip to content

Commit c5f4c08

Browse files
committed
feat: generate migrations file for teamId column rename in the project's
table
1 parent 53f4545 commit c5f4c08

3 files changed

Lines changed: 952 additions & 0 deletions

File tree

drizzle/0004_kind_vision.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ALTER TABLE `project` RENAME COLUMN "teamId" TO "team_id";--> statement-breakpoint
2+
DROP INDEX `project_teamId_slug_unique`;--> statement-breakpoint
3+
CREATE UNIQUE INDEX `project_team_id_slug_unique` ON `project` (`team_id`,`slug`);--> statement-breakpoint
4+
ALTER TABLE `project` ALTER COLUMN "team_id" TO "team_id" text NOT NULL REFERENCES team(id) ON DELETE cascade ON UPDATE no action;

0 commit comments

Comments
 (0)