gitea: routers/init.go:86:GlobalInit() [F] ORM engine initialization failed: migrate: do migrate: Error 1091: Can't DROP INDEX ``; check that it exists

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

Description

I tried to upgrade from gitea-1.4.3-linux-amd64 to gitea-1.9.2-linux-amd64 by replacing the binary. Now I got the message:

routers/init.go:86:GlobalInit() [F] ORM engine initialization failed: migrate: do migrate: Error 1091: Can't DROP INDEX ``; check that it exists

I noticed this ticket: https://github.com/go-gitea/gitea/issues/3056 but in my case there is an empty string instead of index.

Adding the index to the database as described in the other ticket was also not working: ALTER TABLE repo_unit ADD COLUMN index INT;

So currently I can’t run gitea.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Had the same issue minutes ago, while trying to upgrade directly from 1.4.0-rc1 to 1.9.2. I tried to upgrade one minor version at a time (1.4.0-rc1 -> 1.4.0 -> 1.5.2 -> 1.6.4 -> 1.7.6 -> 1.8.3 -> 1.9.2), running gitea web after each upgrade (to run db migrations), and surprisingly it worked.