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

Migrate fails in 1.4.3 #8135

Closed
2 of 7 tasks
cryopie opened this issue Sep 10, 2019 · 5 comments
Closed
2 of 7 tasks

Migrate fails in 1.4.3 #8135

cryopie opened this issue Sep 10, 2019 · 5 comments

Comments

@cryopie
Copy link

cryopie commented Sep 10, 2019

  • Gitea version (or commit ref): 1.5
  • Git version: 1.8.3.1
  • Operating system: CentOS 7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I'm trying to upgrade Gitea from 1.4.3 to anything higher, and it fails to migrate the database. I started with trying to migrate to 1.9, then to 1.6, and then to 1.5. They all fail with:

[I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [watch]
[I] [SQL] SELECT sql FROM sqlite_master WHERE type='table' and name = ? [webhook]
[I] [SQL] SELECT sql FROM sqlite_master WHERE type='index' and tbl_name = ? [webhook]
[I] [SQL] DROP INDEX IDX_label_"idx_label_IDX_label_repo_id"
[...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: migrate: do migrate: Sync2: no such index: IDX_label_"idx_label_IDX_label_repo_id"

How might I fix this in order to upgrade?

@guillep2k
Copy link
Member

I've seen that before. I think the affected user solved that by migrating first from 1.4.3 to 1.5.0, then step-up gradually until reaching 1.9.

@cryopie
Copy link
Author

cryopie commented Sep 10, 2019

I did try migrating to 1.5. In fact, I tried all these:

  • gitea-1.5-linux-amd64
  • gitea-1.5.0-rc1-linux-amd64
  • gitea-1.5.3-linux-amd64

And they all fail with the same message. gitea-1.4.3-linux-amd64 is the latest binary that works.

@cryopie
Copy link
Author

cryopie commented Oct 11, 2019

I'm closing this issue because it doesn't seem to affect anyone else. I'll launch a new instance and try and migrate the repos from the old version.

@cryopie cryopie closed this as completed Oct 11, 2019
@Alan-Liang
Copy link

I experienced a similar issue:
https://gist.github.com/Alan-Liang/24bce4fd6cb6ed717d1a1fa28a317973

@6543
Copy link
Member

6543 commented Feb 25, 2020

@cryopie why not create the index manualy so gitea can drop it ?

@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
None yet
Projects
None yet
Development

No branches or pull requests

4 participants