Enables mssql support (#383)
* Enables mssql support Port of dlobs work in gogs. Enables options in index.js Enables MSSQL as a database option in go. Sets ID to 0 on initial migration. Required for MSSQL insert statements. Signed-off-by: Beau Trepp <beautrepp@gmail.com> * Vendors in denisenkom/go-mssqldb Includes golang.org/x/crypto/md4 as this is required by go-msssqldb Signed-off-by: Beau Trepp <beautrepp@gmail.com>
This commit is contained in:
parent
f2ff0ee846
commit
25b5ffb6af
44 changed files with 69268 additions and 14 deletions
|
@ -228,22 +228,22 @@ function initInstall() {
|
|||
return;
|
||||
}
|
||||
|
||||
var mysqlDefault = '127.0.0.1:3306';
|
||||
var postgresDefault = '127.0.0.1:5432';
|
||||
var dbDefaults = {
|
||||
"MySQL": "127.0.0.1:3306",
|
||||
"PostgreSQL": "127.0.0.1:5432",
|
||||
"MSSQL": "127.0.0.1:1433"
|
||||
};
|
||||
|
||||
$('#sqlite_settings').hide();
|
||||
$('#sql_settings').show();
|
||||
if (dbType === "PostgreSQL") {
|
||||
$('#pgsql_settings').show();
|
||||
if ($('#db_host').val() == mysqlDefault) {
|
||||
$('#db_host').val(postgresDefault);
|
||||
|
||||
$('#pgsql_settings').toggle(dbType === "PostgreSQL");
|
||||
$.each(dbDefaults, function(type, defaultHost) {
|
||||
if ($('#db_host').val() == defaultHost) {
|
||||
$('#db_host').val(dbDefaults[dbType]);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$('#pgsql_settings').hide();
|
||||
if ($('#db_host').val() == postgresDefault) {
|
||||
$('#db_host').val(mysqlDefault);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// TODO: better handling of exclusive relations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue