Skip to content

Commit

Permalink
install: remove MSSQL option (#6295)
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Aug 29, 2020
1 parent cf216f1 commit cb88caa
Show file tree
Hide file tree
Showing 7 changed files with 1,736 additions and 1,739 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to Gogs are documented in this file.
### Changed

- The default branch has been changed to `main`. [#6285](https://github.com/gogs/gogs/pull/6285)
- MSSQL as database backend is deprecated, installation page no longer shows it as an option. Existing installations and manually craft configuration file continue to work. [#6295](https://github.com/gogs/gogs/pull/6295)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion conf/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ internal_server_error = Internal Server Error
install = Installation
title = Install Steps For First-time Run
docker_helper = If you're running Gogs inside Docker, please read <a target="_blank" href="%s">Guidelines</a> carefully before you change anything in this page!
requite_db_desc = Gogs requires MySQL, PostgreSQL, SQLite3, MSSQL or TiDB.
requite_db_desc = Gogs requires MySQL, PostgreSQL, SQLite3 or TiDB (via MySQL protocol).
db_title = Database Settings
db_type = Database Type
host = Host
Expand Down
486 changes: 243 additions & 243 deletions internal/assets/conf/conf_gen.go

Large diffs are not rendered by default.

2,674 changes: 1,337 additions & 1,337 deletions internal/assets/public/public_gen.go

Large diffs are not rendered by default.

302 changes: 151 additions & 151 deletions internal/assets/templates/templates_gen.go

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions internal/route/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func InstallInit(c *context.Context) {
c.Title("install.install")
c.PageIs("Install")

c.Data["DbOptions"] = []string{"MySQL", "PostgreSQL", "MSSQL", "SQLite3"}
c.Data["DbOptions"] = []string{"MySQL", "PostgreSQL", "SQLite3"}
}

func Install(c *context.Context) {
Expand All @@ -137,8 +137,6 @@ func Install(c *context.Context) {
switch conf.Database.Type {
case "mysql":
c.Data["CurDbOption"] = "MySQL"
case "mssql":
c.Data["CurDbOption"] = "MSSQL"
case "sqlite3":
c.Data["CurDbOption"] = "SQLite3"
}
Expand Down Expand Up @@ -210,7 +208,6 @@ func InstallPost(c *context.Context, f form.Install) {
dbTypes := map[string]string{
"PostgreSQL": "postgres",
"MySQL": "mysql",
"MSSQL": "mssql",
"SQLite3": "sqlite3",
}
conf.Database.Type = dbTypes[f.DbType]
Expand Down
5 changes: 2 additions & 3 deletions templates/install.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</div>

<div id="sql_settings" class="{{if or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB")}}hide{{end}}">
<div id="sql_settings" class="{{if eq .CurDbOption "SQLite3"}}hide{{end}}">
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
<label for="db_host">{{.i18n.Tr "install.host"}}</label>
<input id="db_host" name="db_host" value="{{.db_host}}">
Expand Down Expand Up @@ -64,7 +64,7 @@
</div>
</div>

<div id="sqlite_settings" class="{{if not (or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB"))}}hide{{end}}">
<div id="sqlite_settings" class="{{if not (eq .CurDbOption "SQLite3")}}hide{{end}}">
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
<label for="db_path">{{.i18n.Tr "install.path"}}</label>
<input id="db_path" name="db_path" value="{{.db_path}}">
Expand Down Expand Up @@ -274,7 +274,6 @@
var dbDefaults = {
"MySQL": "127.0.0.1:3306",
"PostgreSQL": "127.0.0.1:5432",
"MSSQL": "127.0.0.1, 1433"
};

$('#sqlite_settings').hide();
Expand Down

0 comments on commit cb88caa

Please sign in to comment.