1
0

Make sure all int64 db fields are using bigint when actually storing the data (#741)

Fix lint

Fix migration query for postgres

Fix migration statements

Add migration to make all int(11) fields bigint by default

Make all int(11) fields bigint by default

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/741
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2020-12-18 16:51:22 +00:00
parent f15a8baee3
commit b0d4902406
22 changed files with 279 additions and 71 deletions

View File

@ -28,11 +28,11 @@ import (
// Bucket represents a kanban bucket
type Bucket struct {
// The unique, numeric id of this bucket.
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id" param:"bucket"`
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"bucket"`
// The title of this bucket.
Title string `xorm:"text not null" valid:"required" minLength:"1" json:"title"`
// The list this bucket belongs to.
ListID int64 `xorm:"int(11) not null" json:"list_id" param:"list"`
ListID int64 `xorm:"bigint not null" json:"list_id" param:"list"`
// All tasks which belong to this bucket.
Tasks []*Task `xorm:"-" json:"tasks"`
@ -46,7 +46,7 @@ type Bucket struct {
// The user who initially created the bucket.
CreatedBy *user.User `xorm:"-" json:"created_by" valid:"-"`
CreatedByID int64 `xorm:"int(11) not null" json:"-"`
CreatedByID int64 `xorm:"bigint not null" json:"-"`
web.Rights `xorm:"-" json:"-"`
web.CRUDable `xorm:"-" json:"-"`