From 3e49fe1a008b7b9a11271aaabb5e4c734467cbb1 Mon Sep 17 00:00:00 2001 From: kgtkr Date: Sat, 27 Jan 2024 16:27:55 +0900 Subject: [PATCH] =?UTF-8?q?push=5Fsubscriptions=E3=81=AEendpoint=E3=81=AE?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=95=B7=E3=82=92255=E3=81=8B=E3=82=892048?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration.sql | 10 ++++++++++ packages/server/prisma/schema.prisma | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 packages/server/prisma/migrations/20240127072617_push_subscriptions_endpoint_change_length/migration.sql diff --git a/packages/server/prisma/migrations/20240127072617_push_subscriptions_endpoint_change_length/migration.sql b/packages/server/prisma/migrations/20240127072617_push_subscriptions_endpoint_change_length/migration.sql new file mode 100644 index 0000000..9b23d6b --- /dev/null +++ b/packages/server/prisma/migrations/20240127072617_push_subscriptions_endpoint_change_length/migration.sql @@ -0,0 +1,10 @@ +/* + Warnings: + + - The primary key for the `push_subscriptions` table will be changed. If it partially fails, the table could be left without primary key constraint. + +*/ +-- AlterTable +ALTER TABLE "push_subscriptions" DROP CONSTRAINT "push_subscriptions_pkey", +ALTER COLUMN "endpoint" SET DATA TYPE VARCHAR(2048), +ADD CONSTRAINT "push_subscriptions_pkey" PRIMARY KEY ("user_id", "endpoint"); diff --git a/packages/server/prisma/schema.prisma b/packages/server/prisma/schema.prisma index 9be9148..c250b0d 100644 --- a/packages/server/prisma/schema.prisma +++ b/packages/server/prisma/schema.prisma @@ -265,7 +265,7 @@ model TopicTag { model PushSubscriptions { userId String @map("user_id") @db.VarChar(64) - endpoint String @db.VarChar(255) + endpoint String @db.VarChar(2048) p256dh String @db.VarChar(255) auth String @db.VarChar(255)