From 25a6e93663550f077693fceeff3f7b4c62f17751 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 16 Mar 2024 06:03:13 +0100 Subject: [PATCH] added the correct `gorm:table_options` for `utf8mb4_unicode_ci`-COLLATE to be the default --- server/utils/db.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/utils/db.go b/server/utils/db.go index 802852ac..35cf56d4 100644 --- a/server/utils/db.go +++ b/server/utils/db.go @@ -33,5 +33,6 @@ func SetupDB() *gorm.DB { log.Info("Exiting after migration") os.Exit(0) } + db = db.Set("gorm:table_options", "ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8mb4_unicode_ci") return db }