mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
db: create new session for MySQL after changing attribute (#6338)
This commit is contained in:
parent
dda1092e74
commit
c56db8f2c4
@ -187,7 +187,10 @@ func Init() (*gorm.DB, error) {
|
||||
conf.UsePostgreSQL = true
|
||||
case "mysql":
|
||||
conf.UseMySQL = true
|
||||
db = db.Set("gorm:table_options", "ENGINE=InnoDB")
|
||||
db = db.Set("gorm:table_options", "ENGINE=InnoDB").
|
||||
Session(&gorm.Session{
|
||||
WithConditions: true,
|
||||
})
|
||||
case "sqlite3":
|
||||
conf.UseSQLite3 = true
|
||||
case "mssql":
|
||||
|
Loading…
x
Reference in New Issue
Block a user