-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
1,777 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
Unfortunately in current drizzle-kit version we can't automatically get name for primary key. | ||
We are working on making it available! | ||
Meanwhile you can: | ||
1. Check pk name in your database, by running | ||
SELECT constraint_name FROM information_schema.table_constraints | ||
WHERE table_schema = 'public' | ||
AND table_name = 'tasks' | ||
AND constraint_type = 'PRIMARY KEY'; | ||
2. Uncomment code below and paste pk name manually | ||
Hope to release this update as soon as possible | ||
*/ | ||
|
||
-- ALTER TABLE "tasks" DROP CONSTRAINT "<constraint_name>";--> statement-breakpoint | ||
ALTER TABLE "tasks" ADD COLUMN "id" text NOT NULL;--> statement-breakpoint | ||
ALTER TABLE "tasks" ADD CONSTRAINT "tasks_prefix_unique" UNIQUE("prefix"); |
Oops, something went wrong.