mirror of
				https://github.com/h44z/wg-portal.git
				synced 2025-11-03 23:56:18 +00:00 
			
		
		
		
	fix migration issue for mysql/mariadb (#128)
This commit is contained in:
		@@ -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"`
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user