Fix migration to add position to task
Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
parent
8ef2da8f5f
commit
32a5dff78d
1 changed files with 2 additions and 2 deletions
|
@ -17,13 +17,13 @@
|
||||||
package migration
|
package migration
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/models"
|
|
||||||
"math"
|
"math"
|
||||||
"src.techknowlogick.com/xormigrate"
|
"src.techknowlogick.com/xormigrate"
|
||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type task20200420215928 struct {
|
type task20200420215928 struct {
|
||||||
|
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"listtask"`
|
||||||
Position float64 `xorm:"double null" json:"position"`
|
Position float64 `xorm:"double null" json:"position"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a position according to their id -> gives a starting position
|
// Create a position according to their id -> gives a starting position
|
||||||
tasks := []*models.Task{}
|
tasks := []*task20200420215928{}
|
||||||
err = tx.Find(&tasks)
|
err = tx.Find(&tasks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue