From 04ad8fe648354d216cddad5deab2026056d2d970 Mon Sep 17 00:00:00 2001 From: Sang Dang Date: Wed, 13 Sep 2023 00:59:11 +0300 Subject: [PATCH] added preference and generate migration --- prisma/migrations/20230912215814_add_preferences/migration.sql | 2 ++ prisma/schema.prisma | 1 + 2 files changed, 3 insertions(+) create mode 100644 prisma/migrations/20230912215814_add_preferences/migration.sql diff --git a/prisma/migrations/20230912215814_add_preferences/migration.sql b/prisma/migrations/20230912215814_add_preferences/migration.sql new file mode 100644 index 0000000..64e3528 --- /dev/null +++ b/prisma/migrations/20230912215814_add_preferences/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "User" ADD COLUMN "preferences" JSONB NOT NULL DEFAULT '{}'; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 4f71580..9db07fb 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -57,6 +57,7 @@ model User { password String image String? role UserRole @default(USER) + preferences Json @default("{}") accounts Account[] sessions Session[] pages Page[]