Add Golangci Lint (#676)
Increase golangci timeout Fix installing golangci-lint in ci Remove mage targets replaced by golangci Run golint in ci Add goheader linter Enable & fix more linters Fix lint issues Add mage target to automagically fix issues found by golangci golangci-lint run --fix Add golangci config Add golangci mage target Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676 Co-Authored-By: konrad <konrad@kola-entertainments.de> Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -18,8 +18,9 @@ package migration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"src.techknowlogick.com/xormigrate"
|
||||
"strings"
|
||||
|
||||
"src.techknowlogick.com/xormigrate"
|
||||
"xorm.io/xorm"
|
||||
"xorm.io/xorm/schemas"
|
||||
)
|
||||
@ -654,7 +655,7 @@ create unique index UQE_users_namespace_id
|
||||
// The statement is probably useless anyway since its only purpose is to clean up old tables
|
||||
// which may be leftovers from a previously failed migration. However, since the whole thing
|
||||
// is wrapped in sessions, this is extremely unlikely to happen anyway.
|
||||
//"ALTER TABLE " + table + " DROP COLUMN IF EXISTS " + colTmp + ";",
|
||||
// "ALTER TABLE " + table + " DROP COLUMN IF EXISTS " + colTmp + ";",
|
||||
"ALTER TABLE " + table + " ADD COLUMN " + colTmp + " DATETIME NULL;",
|
||||
// #nosec
|
||||
"UPDATE " + table + " SET " + colTmp + " = IF(" + colOld + " = 0, NULL, FROM_UNIXTIME(" + colOld + "));",
|
||||
|
Reference in New Issue
Block a user