Browse Source

fix DatabaseMysql 新增的 From字段 不允许为空 但未设置默认值 导致已存在数据库的1panel升级时无法正常启动 (#1772)

Co-authored-by: 邵传波 <shaocb@mail.unitid.cn>
pull/1774/head
longyuan 1 year ago committed by GitHub
parent
commit
2a20ff0b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      backend/app/model/database_mysql.go

2
backend/app/model/database_mysql.go

@ -3,7 +3,7 @@ package model
type DatabaseMysql struct {
BaseModel
Name string `json:"name" gorm:"type:varchar(256);not null"`
From string `json:"type" gorm:"type:varchar(256);not null"`
From string `json:"type" gorm:"type:varchar(256);not null;default:'local'"`
MysqlName string `json:"mysqlName" gorm:"type:varchar(64);not null"`
Format string `json:"format" gorm:"type:varchar(64);not null"`
Username string `json:"username" gorm:"type:varchar(256);not null"`

Loading…
Cancel
Save