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)