From 0c3084cdbfb5b7386f40925a94dbe46cdbc29cc1 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Wed, 21 Aug 2024 16:52:59 +0700 Subject: [PATCH] feat: add contact name field --- .../20240821095242_add_missing_field/migration.sql | 8 ++++++++ prisma/schema.prisma | 1 + src/controllers/customer-branch-controller.ts | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 prisma/migrations/20240821095242_add_missing_field/migration.sql diff --git a/prisma/migrations/20240821095242_add_missing_field/migration.sql b/prisma/migrations/20240821095242_add_missing_field/migration.sql new file mode 100644 index 0000000..d203128 --- /dev/null +++ b/prisma/migrations/20240821095242_add_missing_field/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - Added the required column `contactName` to the `CustomerBranch` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "CustomerBranch" ADD COLUMN "contactName" TEXT NOT NULL; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 98a211d..6842166 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -463,6 +463,7 @@ model CustomerBranch { subDistrictId String? email String + contactName String telephoneNo String employmentOffice String diff --git a/src/controllers/customer-branch-controller.ts b/src/controllers/customer-branch-controller.ts index f742a0d..894ed18 100644 --- a/src/controllers/customer-branch-controller.ts +++ b/src/controllers/customer-branch-controller.ts @@ -66,6 +66,7 @@ export type CustomerBranchCreate = ( addressEN: string; email: string; + contactName: string; telephoneNo: string; employmentOffice: string; @@ -107,6 +108,7 @@ export type CustomerBranchUpdate = ( addressEN: string; email?: string; + contactName?: string; telephoneNo?: string; employmentOffice?: string;