From 8f3ebd982ce38c2503d256fe2f4d46ea8714da6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com>
Date: Thu, 11 Nov 2021 13:07:48 +0100
Subject: [PATCH] fix id generation

---
 db/data.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/db/data.go b/db/data.go
index 45ede26..ab91dc7 100644
--- a/db/data.go
+++ b/db/data.go
@@ -27,7 +27,7 @@ type Cookie struct {
 }
 
 type Message struct {
-	Id      uuid.UUID `gorm:"primaryKey"`
+	Id      uuid.UUID `gorm:"primaryKey;default:gen_random_uuid()"`
 	Sent    time.Time `gorm:"default:now()"`
 	Message string
 	SchAcc  string          `gorm:"type:varchar(22)"`
-- 
GitLab