From ddb2155c44c22968bb3c3f3d7eadf0e548d50579 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:22:12 +0700 Subject: [PATCH] chore: add migration --- .../20240417020614_remove_field/migration.sql | 8 ++++++++ .../20240417041541_move_field/migration.sql | 11 +++++++++++ prisma/schema.prisma | 4 +--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 prisma/migrations/20240417020614_remove_field/migration.sql create mode 100644 prisma/migrations/20240417041541_move_field/migration.sql diff --git a/prisma/migrations/20240417020614_remove_field/migration.sql b/prisma/migrations/20240417020614_remove_field/migration.sql new file mode 100644 index 0000000..3cb801f --- /dev/null +++ b/prisma/migrations/20240417020614_remove_field/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - You are about to drop the column `keycloakId` on the `User` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "User" DROP COLUMN "keycloakId"; diff --git a/prisma/migrations/20240417041541_move_field/migration.sql b/prisma/migrations/20240417041541_move_field/migration.sql new file mode 100644 index 0000000..3b720dc --- /dev/null +++ b/prisma/migrations/20240417041541_move_field/migration.sql @@ -0,0 +1,11 @@ +/* + Warnings: + + - You are about to drop the column `lineId` on the `BranchContact` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE "Branch" ADD COLUMN "lineId" TEXT; + +-- AlterTable +ALTER TABLE "BranchContact" DROP COLUMN "lineId"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 1829f9b..98cbe89 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -93,6 +93,7 @@ model Branch { email String telephoneNo String + lineId String? latitude String longitude String @@ -117,7 +118,6 @@ model Branch { model BranchContact { id String @id @default(uuid()) telephoneNo String - lineId String branch Branch @relation(fields: [branchId], references: [id], onDelete: Cascade) branchId String @@ -153,8 +153,6 @@ enum UserType { model User { id String @id @default(uuid()) - keycloakId String - code String? firstName String firstNameEN String