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

@ -76,15 +76,15 @@ func (rk RelationKind) isValid() bool {
// TaskRelation represents a kind of relation between two tasks
type TaskRelation struct {
// The unique, numeric id of this relation.
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"-"`
ID int64 `xorm:"bigint autoincr not null unique pk" json:"-"`
// The ID of the "base" task, the task which has a relation to another.
TaskID int64 `xorm:"int(11) not null" json:"task_id" param:"task"`
TaskID int64 `xorm:"bigint not null" json:"task_id" param:"task"`
// The ID of the other task, the task which is being related.
OtherTaskID int64 `xorm:"int(11) not null" json:"other_task_id"`
OtherTaskID int64 `xorm:"bigint not null" json:"other_task_id"`
// The kind of the relation.
RelationKind RelationKind `xorm:"varchar(50) not null" json:"relation_kind"`
CreatedByID int64 `xorm:"int(11) not null" json:"-"`
CreatedByID int64 `xorm:"bigint not null" json:"-"`
// The user who created this relation
CreatedBy *user.User `xorm:"-" json:"created_by"`