Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration fixes for gogs (0.11.66) to gitea (1.6.0) #5318 #5341

Merged
merged 3 commits into from
Nov 18, 2018

Conversation

nougad
Copy link
Contributor

@nougad nougad commented Nov 15, 2018

see #5318

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
Otherwise the migration will fail if executed from a older database
version without multiple IssueWatch feature.

```
2018/11/11 23:51:14 [I] [SQL] SELECT DISTINCT "issue_watch"."user_id", "issue"."repo_id" FROM "issue_watch" INNER JOIN issue ON issue_watch.issue_id = issue.id WHERE (issue_watch.is_watching = $1) LIMIT 50 []int
[...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: pq: relation "issue_watch" does not exist
```

see go-gitea#5318
@bkcsoft bkcsoft added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 15, 2018
@lafriks lafriks added this to the 1.7.0 milestone Nov 15, 2018
@codecov-io
Copy link

codecov-io commented Nov 15, 2018

Codecov Report

Merging #5341 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5341      +/-   ##
==========================================
- Coverage   37.35%   37.35%   -0.01%     
==========================================
  Files         312      312              
  Lines       46409    46414       +5     
==========================================
  Hits        17336    17336              
- Misses      26588    26593       +5     
  Partials     2485     2485
Impacted Files Coverage Δ
models/migrations/v64.go 0% <ø> (ø) ⬆️
models/migrations/v67.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 241ee79...75e5ef5. Read the comment docs.

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 18, 2018
@lafriks lafriks merged commit d9b51a7 into go-gitea:master Nov 18, 2018
@lafriks
Copy link
Member

lafriks commented Nov 18, 2018

@nougad please send backport to release/1.6 branch

@nougad nougad deleted the migration-fixes-5318 branch November 18, 2018 19:11
@lafriks lafriks added the backport/done All backports for this PR have been created label Nov 18, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants