Skip to content

Commit

Permalink
Remove field from migration to support upgrades from older version
Browse files Browse the repository at this point in the history
That will ensure the field does not get queried in the Select if it does
not exist yet:

```
[I] [SQL] SELECT "id", "repo_id", "index", "poster_id", "name", "content", "milestone_id", "priority", "assignee_id", "is_closed", "is_pull", "num_comments", "ref", "deadline_unix", "created_unix", "updated_unix
[...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: pq: column "ref" does not exist
```

see go-gitea#5318
  • Loading branch information
nougad committed Nov 15, 2018
1 parent 7278372 commit 0f803f7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion models/migrations/v64.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func addMultipleAssignees(x *xorm.Engine) error {
IsClosed bool `xorm:"INDEX"`
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
NumComments int
Ref string

DeadlineUnix util.TimeStamp `xorm:"INDEX"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
Expand Down

0 comments on commit 0f803f7

Please sign in to comment.