diff options
| author | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-03-25 15:55:45 +0900 |
| commit | 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 (patch) | |
| tree | 8a5587f10ca55b162d7e3254cb088b323a34c41b /db/migrations/0015_black_fixer.sql | |
initial commit
Diffstat (limited to 'db/migrations/0015_black_fixer.sql')
| -rw-r--r-- | db/migrations/0015_black_fixer.sql | 18 |
1 files changed, 18 insertions, 0 deletions
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 "<constraint_name>";--> 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 |
