aboutsummaryrefslogtreecommitdiff
path: root/internal/db/migrations/v18.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-22 09:05:26 +0800
committerGitHub <noreply@github.com>2020-02-22 09:05:26 +0800
commit648d9e253c1924b832248f26fee42b2fb64dc3bc (patch)
tree51649fad974cd7284a47d30e412c90e7ab72cd2c /internal/db/migrations/v18.go
parent5b14cc6f0b7b661beb2640a94bd15660cdb48587 (diff)
conf: overhaul server settings (#5928)
* conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL
Diffstat (limited to 'internal/db/migrations/v18.go')
-rw-r--r--internal/db/migrations/v18.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/migrations/v18.go b/internal/db/migrations/v18.go
index 9ebb46ed..ceeb5c7a 100644
--- a/internal/db/migrations/v18.go
+++ b/internal/db/migrations/v18.go
@@ -9,7 +9,7 @@ import (
"xorm.io/xorm"
- "gogs.io/gogs/internal/setting"
+ "gogs.io/gogs/internal/conf"
)
func updateRepositoryDescriptionField(x *xorm.Engine) error {
@@ -20,13 +20,13 @@ func updateRepositoryDescriptionField(x *xorm.Engine) error {
return nil
}
switch {
- case setting.UseMySQL:
+ case conf.UseMySQL:
_, err = x.Exec("ALTER TABLE `repository` MODIFY `description` VARCHAR(512);")
- case setting.UseMSSQL:
+ case conf.UseMSSQL:
_, err = x.Exec("ALTER TABLE `repository` ALTER COLUMN `description` VARCHAR(512);")
- case setting.UsePostgreSQL:
+ case conf.UsePostgreSQL:
_, err = x.Exec("ALTER TABLE `repository` ALTER COLUMN `description` TYPE VARCHAR(512);")
- case setting.UseSQLite3:
+ case conf.UseSQLite3:
// Sqlite3 uses TEXT type by default for any string type field.
// Keep this comment to mention that we don't missed any option.
}