aboutsummaryrefslogtreecommitdiff
path: root/models/migrations/v1_13/v145.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v1_13/v145.go')
-rw-r--r--models/migrations/v1_13/v145.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/migrations/v1_13/v145.go b/models/migrations/v1_13/v145.go
index c96e79f8a..ee40bfc77 100644
--- a/models/migrations/v1_13/v145.go
+++ b/models/migrations/v1_13/v145.go
@@ -21,7 +21,7 @@ func IncreaseLanguageField(x *xorm.Engine) error {
return err
}
- if setting.Database.UseSQLite3 {
+ if setting.Database.Type.IsSQLite3() {
// SQLite maps VARCHAR to TEXT without size so we're done
return nil
}
@@ -41,11 +41,11 @@ func IncreaseLanguageField(x *xorm.Engine) error {
}
switch {
- case setting.Database.UseMySQL:
+ case setting.Database.Type.IsMySQL():
if _, err := sess.Exec(fmt.Sprintf("ALTER TABLE language_stat MODIFY COLUMN language %s", sqlType)); err != nil {
return err
}
- case setting.Database.UseMSSQL:
+ case setting.Database.Type.IsMSSQL():
// Yet again MSSQL just has to be awkward.
// Here we have to drop the constraints first and then rebuild them
constraints := make([]string, 0)
@@ -71,7 +71,7 @@ func IncreaseLanguageField(x *xorm.Engine) error {
if err := sess.CreateUniques(new(LanguageStat)); err != nil {
return err
}
- case setting.Database.UsePostgreSQL:
+ case setting.Database.Type.IsPostgreSQL():
if _, err := sess.Exec(fmt.Sprintf("ALTER TABLE language_stat ALTER COLUMN language TYPE %s", sqlType)); err != nil {
return err
}