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

SQLite - Unknown col "is_empty" in index is_bare in all Versions after 18.01.2019 #5797

Closed
2 of 7 tasks
wofnull opened this issue Jan 22, 2019 · 10 comments
Closed
2 of 7 tasks

Comments

@wofnull
Copy link

wofnull commented Jan 22, 2019

  • Gitea version (or commit ref): 2d94561
  • Git version: 2.11
  • Operating system: Debian
  • 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:
    2019/01/22 07:10:25 [I] Log Mode: File(Info)
    2019/01/22 07:10:25 [I] XORM Log Mode: File(Info)
    2019/01/22 07:10:25 [I] Cache Service Enabled
    2019/01/22 07:10:25 [I] Session Service Enabled
    2019/01/22 07:10:25 [I] Beginning ORM engine initialization.
    2019/01/22 07:10:25 [I] ORM engine initialization attempt Rename import paths: "github.com/gogits/gogs" -> "github.com/go-gitea/gitea" #1/10...
    2019/01/22 07:10:25 [I] Backing off for 3 seconds
    2019/01/22 07:10:28 [I] ORM engine initialization attempt Fix sender of issue notifications #2/10...
    2019/01/22 07:10:28 [I] Backing off for 3 seconds
    2019/01/22 07:10:31 [I] ORM engine initialization attempt Use proper url for libravatar dep #3/10...
    2019/01/22 07:10:31 [I] Backing off for 3 seconds
    2019/01/22 07:10:34 [I] ORM engine initialization attempt Small UI fixes on form titles #4/10...
    2019/01/22 07:10:34 [I] Backing off for 3 seconds
    2019/01/22 07:10:37 [I] ORM engine initialization attempt Small UI fixes on full width form titles #5/10...
    2019/01/22 07:10:37 [I] Backing off for 3 seconds
    2019/01/22 07:10:40 [I] ORM engine initialization attempt Contribution system: History heatmap for user #6/10...
    2019/01/22 07:10:40 [I] Backing off for 3 seconds
    2019/01/22 07:10:43 [I] ORM engine initialization attempt display page revisions on wiki #7/10...
    2019/01/22 07:10:43 [I] Backing off for 3 seconds
    2019/01/22 07:10:46 [I] ORM engine initialization attempt audit logs #8/10...
    2019/01/22 07:10:46 [I] Backing off for 3 seconds
    2019/01/22 07:10:49 [I] ORM engine initialization attempt option to add and remove all repositories on team #9/10...
    2019/01/22 07:10:49 [I] Backing off for 3 seconds
    2019/01/22 07:10:52 [I] ORM engine initialization attempt Order milestone by asc or option to set milestones order #10/10...
    2019/01/22 07:10:52 [...itea/routers/init.go:81 GlobalInit()] [E] ORM engine initialization failed: sync database struct error: Unknown col "is_empty" in index is_bare of table repository, columns [i
    d owner_id lower_name name description website default_branch num_watches num_stars num_forks num_issues num_closed_issues num_pulls num_closed_pulls num_milestones num_closed_milestones is_private i
    s_empty is_mirror is_fork fork_id size created_unix updated_unix is_fsck_enabled topics]

Description:

Since the weekend ( last sucessfull DB change Jan 18 01:58 gitea.db ) the gitea instance on my server failed to start after an automatic update to restart, it looks like a db change was not successfully made causing the server to fail on startup.

Switiching back to a version prior to the one from the 18th seems to work for the moment.

@zeripath
Copy link
Contributor

Please could you check the value of the version table in sqlite.

SELECT * FROM version

If your version is 79 you have two options:

  • Drop it back to 78 and restart - the migration script should work now. Please get back to us if not.
  • DROP INDEX IF EXISTS IDX_repository_is_bare

If your version is 78 the DROP command above should work but, shouldn't be necessary, and it was definitely working until the last change.

@zeripath
Copy link
Contributor

Please get back to us to tell us what version you have

@wofnull
Copy link
Author

wofnull commented Jan 22, 2019

DB Version is 79 as suspected

Set it back to 78 , Update happened upon next restart of GITEA -> Access is now possible again.

@zeripath
Copy link
Contributor

Cool I'll close this issue.

@xeals
Copy link

xeals commented Jan 23, 2019

I'm getting the same issue on DB version 74. Not sure how practical the above advice is due to skipping migrations. Any advice?

@zeripath
Copy link
Contributor

Have you tried gitea migrate?

@xeals
Copy link

xeals commented Jan 23, 2019

I thought I had and was getting a non-working result, but it's now working. Sorry for the hassle.

@MNickelson
Copy link

My database says it's version 79. I will try resetting it to 78 or dropping it tonight.

@andrew-from-toronto
Copy link

andrew-from-toronto commented Jul 14, 2019

I've just recently hit this as well - dropping index resolved (changing version to 78 broke things more), but seems like bad migration if it's happening to multiple people.

@zeripath
Copy link
Contributor

@andrewhunt12 we need a little more info - we've put multiple fixes in for this. We even run the migration on a test db for every pr, merge, release and tag.

So if it's still not working could you please tell us when and how you hit this.

@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

5 participants