From 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Tue, 25 Mar 2025 15:55:45 +0900 Subject: initial commit --- db/migrations/0015_black_fixer.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/migrations/0015_black_fixer.sql (limited to 'db/migrations/0015_black_fixer.sql') diff --git a/db/migrations/0015_black_fixer.sql b/db/migrations/0015_black_fixer.sql new file mode 100644 index 00000000..da6260c8 --- /dev/null +++ b/db/migrations/0015_black_fixer.sql @@ -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 = 'items' + 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 "items" DROP CONSTRAINT "";--> statement-breakpoint +ALTER TABLE "items" ALTER COLUMN "item_code" DROP NOT NULL;--> statement-breakpoint +ALTER TABLE "items" ADD CONSTRAINT "items_item_code_unique" UNIQUE("item_code"); \ No newline at end of file -- cgit v1.2.3