From 32293490da53b769b55f83dc01c5496f3b7d25f2 Mon Sep 17 00:00:00 2001
From: Wo-ogie <siwall0105@gmail.com>
Date: Mon, 27 Nov 2023 15:50:15 +0900
Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=98=EB=AA=BB=20=EC=84=A4=EC=A0=95?=
 =?UTF-8?q?=EB=90=9C=20=EC=B0=B8=EA=B0=80=EC=9E=90=20unique=20constraints?=
 =?UTF-8?q?=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 models/participant.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/models/participant.js b/models/participant.js
index d379fa4..00c69dd 100644
--- a/models/participant.js
+++ b/models/participant.js
@@ -7,7 +7,6 @@ class Participant extends Sequelize.Model {
         name: {
           type: Sequelize.STRING(10),
           allowNull: false,
-          unique: true,
         },
         password: {
           type: Sequelize.STRING(100),
@@ -27,6 +26,9 @@ class Participant extends Sequelize.Model {
         paranoid: false,
         charset: 'utf8mb4',
         collate: 'utf8mb4_general_ci',
+        uniqueKeys: {
+          uniqueNameMeetingId: { fields: ['name', 'meeting_id'] },
+        },
       },
     );
   }
-- 
GitLab