From b57cd6ac95a88e04a4c1e57eb68e4236a2b27eb3 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:12:09 +0700 Subject: [PATCH] chore: update migration --- .../20240611081013_restructure_database/migration.sql | 11 +++++++++++ prisma/schema.prisma | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 prisma/migrations/20240611081013_restructure_database/migration.sql diff --git a/prisma/migrations/20240611081013_restructure_database/migration.sql b/prisma/migrations/20240611081013_restructure_database/migration.sql new file mode 100644 index 0000000..075d9b2 --- /dev/null +++ b/prisma/migrations/20240611081013_restructure_database/migration.sql @@ -0,0 +1,11 @@ +/* + Warnings: + + - Added the required column `code` to the `CustomerBranch` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE "CustomerBranch" ADD COLUMN "code" TEXT NOT NULL; + +-- AlterTable +ALTER TABLE "Product" ADD COLUMN "attributes" JSONB; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 85230f2..432e0e6 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -350,6 +350,7 @@ model Customer { model CustomerBranch { id String @id @default(uuid()) branchNo Int + code String legalPersonNo String name String @@ -638,6 +639,8 @@ model Product { workProduct WorkProduct[] + attributes Json? + createdBy String? createdAt DateTime @default(now()) updateBy String?