This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/models
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
..
fixtures
migrations
access.go
access_test.go
action.go Fix bug when repo remained bare if multiple branches pushed (#4923) 2018-09-13 11:40:35 +08:00
action_list.go
action_test.go
admin.go
admin_test.go
attachment.go
attachment_test.go
branches.go
branches_test.go
consistency.go
error.go
error_oauth2.go
external_login_user.go
git_diff.go
git_diff_test.go
gpg_key.go
gpg_key_test.go
graph.go
graph_test.go
helper.go
issue.go
issue_assignees.go
issue_assignees_test.go
issue_comment.go
issue_comment_test.go Pull request review/approval and comment on code (#3748) 2018-08-06 06:43:21 +02:00
issue_dependency.go fix sqlite lock (#5184) 2018-10-27 22:45:24 +08:00
issue_dependency_test.go
issue_indexer.go
issue_label.go
issue_label_test.go
issue_list.go
issue_list_test.go
issue_mail.go Don't disclose emails of all users when sending out emails (#4664) 2018-08-24 00:41:26 -04:00
issue_milestone.go
issue_milestone_test.go
issue_reaction.go
issue_reaction_test.go
issue_stopwatch.go
issue_stopwatch_test.go
issue_test.go
issue_tracked_time.go
issue_tracked_time_test.go
issue_user.go
issue_user_test.go
issue_watch.go
issue_watch_test.go
lfs.go
lfs_lock.go
login_source.go
mail.go
main_test.go Unit tests for wiki routers (#3022) 2017-11-30 17:52:15 +02:00
models.go
models_sqlite.go
models_test.go
notification.go Fix sqlite lock (#5176) 2018-10-25 18:55:16 +08:00
notification_test.go
oauth2.go
org.go fix sqlite and mssql lock (#5214) 2018-10-29 09:48:37 -04:00
org_team.go
org_team_test.go
org_test.go
pull.go
pull_test.go Disable merging a WIP Pull request (#4529) 2018-08-13 22:04:39 +03:00
release.go
release_test.go
repo.go
repo_activity.go
repo_branch.go
repo_collaboration.go
repo_collaboration_test.go
repo_editor.go
repo_indexer.go
repo_issue.go
repo_list.go
repo_list_test.go
repo_mirror.go
repo_redirect.go
repo_redirect_test.go
repo_test.go
repo_unit.go
repo_watch.go
repo_watch_test.go
review.go
review_test.go
ssh_key.go
ssh_key_test.go
star.go
star_test.go
status.go
status_test.go
test_fixtures.go
token.go
token_test.go
topic.go
topic_test.go
twofactor.go
u2f.go
u2f_test.go
unit.go
unit_tests.go
update.go
update_test.go Fix tests code to prevent some runtime errors (#2381) 2017-08-28 12:17:45 +03:00
user.go
user_follow.go
user_follow_test.go
user_heatmap.go
user_heatmap_test.go
user_mail.go
user_mail_test.go
user_openid.go
user_openid_test.go
user_test.go
webhook.go
webhook_dingtalk.go
webhook_discord.go
webhook_slack.go
webhook_test.go Add more webhooks support and refactor webhook templates directory (#3929) 2018-05-16 22:01:55 +08:00
wiki.go
wiki_test.go