From 32a5dff78d24474907fa4a8aab2d015c7edfbe42 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 7 Jun 2020 18:28:49 +0200 Subject: [PATCH] Fix migration to add position to task Signed-off-by: kolaente --- pkg/migration/20200420215928.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/migration/20200420215928.go b/pkg/migration/20200420215928.go index 8ffbc05447..9cf85a605c 100644 --- a/pkg/migration/20200420215928.go +++ b/pkg/migration/20200420215928.go @@ -17,13 +17,13 @@ package migration import ( - "code.vikunja.io/api/pkg/models" "math" "src.techknowlogick.com/xormigrate" "xorm.io/xorm" ) type task20200420215928 struct { + ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"listtask"` Position float64 `xorm:"double null" json:"position"` } @@ -42,7 +42,7 @@ func init() { } // Create a position according to their id -> gives a starting position - tasks := []*models.Task{} + tasks := []*task20200420215928{} err = tx.Find(&tasks) if err != nil { return err