Migrate 1.13.7 to 1.14.1 failed, need help #7186

Closed
opened 2025-11-02 07:18:55 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @yusiwen on GitHub (Apr 16, 2021).

The error output of gitea-1.14.1-linux-amd64 doctor --all is shown below:

[2] Check Database Version
 - [C] Error: migrate: Current database version 156 is not equal to the expected version 178. Please run "gitea [--config /path/to/app.ini] migrate" to update the database version during ensure up to date
ERROR
[3] Check consistency of database
 - [C] Model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded
ERROR

The output of gitea-1.14.1-linux-amd64 migrate is shown below:

...
2021/04/16 15:26:55 ...ations/migrations.go:397:Migrate() [I] [SQL] ROLLBACK [] - 353.864µs
2021/04/16 15:26:55 cmd/migrate.go:38:runMigrate() [F] Failed to initialize ORM engine: migrate: do migrate: GetTagCommit: object does not exist [id: f1beee0c8b030aec9c2863ebf884f8eb88d9ed6c, rel_path: ]

It seems something in the database is missing, anyone can help? Thanks

Originally created by @yusiwen on GitHub (Apr 16, 2021). The error output of `gitea-1.14.1-linux-amd64 doctor --all` is shown below: ```text [2] Check Database Version - [C] Error: migrate: Current database version 156 is not equal to the expected version 178. Please run "gitea [--config /path/to/app.ini] migrate" to update the database version during ensure up to date ERROR [3] Check consistency of database - [C] Model version on the database does not match the current Gitea version. Model consistency will not be checked until the database is upgraded ERROR ``` The output of `gitea-1.14.1-linux-amd64 migrate` is shown below: ```text ... 2021/04/16 15:26:55 ...ations/migrations.go:397:Migrate() [I] [SQL] ROLLBACK [] - 353.864µs 2021/04/16 15:26:55 cmd/migrate.go:38:runMigrate() [F] Failed to initialize ORM engine: migrate: do migrate: GetTagCommit: object does not exist [id: f1beee0c8b030aec9c2863ebf884f8eb88d9ed6c, rel_path: ] ``` It seems something in the database is missing, anyone can help? Thanks
GiteaMirror added the type/questiontype/bug labels 2025-11-02 07:18:56 -06:00
Author
Owner

@yusiwen commented on GitHub (Apr 16, 2021):

BTW, the diagnostic result of gitea-1.13.7-linux-amd64 doctor --all is all green, no error found. 1.13.7 is my current running version.

@yusiwen commented on GitHub (Apr 16, 2021): BTW, the diagnostic result of `gitea-1.13.7-linux-amd64 doctor --all` is all green, no error found. `1.13.7` is my current running version.
Author
Owner

@zeripath commented on GitHub (Apr 16, 2021):

Hmm. It would be useful to know if using 1.14.0 first succeed. (This is an unusual step that I would not normally recommend.)

I need to know if what you're running on: Windows, Linux or something else and if you're using gogit.

There is a release which is referring to an object in your gitea-repositories that is not present - presumably because a tag has been deleted.

The solution is to make this migration a bit more tolerant and I will do that but you should try to find out what has happened.

@zeripath commented on GitHub (Apr 16, 2021): Hmm. It would be useful to know if using 1.14.0 first succeed. (This is an unusual step that I would not normally recommend.) I need to know if what you're running on: Windows, Linux or something else and if you're using gogit. There is a release which is referring to an object in your gitea-repositories that is not present - presumably because a tag has been deleted. The solution is to make this migration a bit more tolerant and I will do that but you should try to find out what has happened.
Author
Owner

@raucao commented on GitHub (Apr 17, 2021):

Same issue here, also with 1.14.0.

@raucao commented on GitHub (Apr 17, 2021): Same issue here, also with 1.14.0.
Author
Owner

@zeripath commented on GitHub (Apr 17, 2021):

Should be fixed by #15519 & its backport #15527

@zeripath commented on GitHub (Apr 17, 2021): Should be fixed by #15519 & its backport #15527
Author
Owner

@6543 commented on GitHub (Apr 30, 2021):

@yusiwen can you confirm that it is fixed by using https://dl.gitea.io/gitea/1.14/ binary?

@6543 commented on GitHub (Apr 30, 2021): @yusiwen can you confirm that it is fixed by using https://dl.gitea.io/gitea/1.14/ binary?
Author
Owner

@6543 commented on GitHub (May 7, 2021):

@raucao is it solved ☝️ ?

@6543 commented on GitHub (May 7, 2021): @raucao is it solved :point_up: ?
Author
Owner

@zeripath commented on GitHub (May 7, 2021):

I'm going to close this as fixed. Please reopen if this is still an issue.

@zeripath commented on GitHub (May 7, 2021): I'm going to close this as fixed. Please reopen if this is still an issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7186