From bda8c9a3d1b012f318c826dcf8e88329465784f0 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Fri, 11 Nov 2022 18:07:48 +0100 Subject: [PATCH] fix migration issue for mysql/mariadb (#128) --- internal/common/db.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/common/db.go b/internal/common/db.go index 31db6ae..39e4158 100644 --- a/internal/common/db.go +++ b/internal/common/db.go @@ -41,6 +41,11 @@ func init() { migrations = append(migrations, Migration{ version: "1.0.9", migrateFn: func(db *gorm.DB) error { + if db.Dialector.Name() != (sqlite.Dialector{}).Name() { + logrus.Infof("upgraded database format to version 1.0.9") + return nil // only perform migration for sqlite + } + type sqlIndex struct { Name string `gorm:"column:name"` Table string `gorm:"column:tbl_name"`