From 25b5ffb6af390eac8d4a76c134379fd1ae88a423 Mon Sep 17 00:00:00 2001 From: btrepp Date: Sat, 24 Dec 2016 09:37:35 +0800 Subject: 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 * Vendors in denisenkom/go-mssqldb Includes golang.org/x/crypto/md4 as this is required by go-msssqldb Signed-off-by: Beau Trepp --- models/migrations/migrations.go | 1 + 1 file changed, 1 insertion(+) (limited to 'models/migrations/migrations.go') diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 2d5aba7546..6393747b0e 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -93,6 +93,7 @@ func Migrate(x *xorm.Engine) error { } else if !has { // If the version record does not exist we think // it is a fresh installation and we can skip all migrations. + currentVersion.ID = 0 currentVersion.Version = int64(minDBVersion + len(migrations)) if _, err = x.InsertOne(currentVersion); err != nil { -- cgit v1.2.3