fix migration issue for mysql/mariadb (#128)

This commit is contained in:
Christoph Haas 2022-11-11 18:07:48 +01:00
parent 54716f7f53
commit bda8c9a3d1

View File

@ -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"`