1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 17:24:43 +00:00
Florian Eitel d9b51a781c Migration fixes for gogs (0.11.66) to gitea (1.6.0) #5318 (#5341)
* Remove field from migration to support upgrades from older version

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 #5318

* Skip remove stale watcher migration if not required

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 #5318
2018-11-18 20:25:32 +02:00
..
2017-02-21 23:02:10 +08:00
2017-02-23 11:40:44 +08:00
2017-05-16 08:36:09 +08:00
2017-09-19 11:08:30 +03:00
2017-03-21 08:55:00 +08:00
2017-03-20 02:55:07 +01:00
2017-04-30 10:08:16 +08:00
2017-04-21 19:32:31 +08:00
2017-05-18 22:54:24 +08:00
2017-05-18 22:54:24 +08:00
2017-06-04 11:09:50 +08:00
2017-10-26 08:49:16 +08:00
2017-10-27 09:10:54 +03:00
2018-05-09 19:29:04 +03:00
2018-03-13 10:03:55 +08:00
2018-03-31 09:10:44 +08:00
2018-05-05 08:28:30 +08:00
2018-05-19 17:12:37 +03:00
2018-09-13 15:04:25 +03:00