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

Repository listing filter broken after upgrading from gogs 0.11.91 to gitea 1.12.0-rc2 #11824

Closed
2 of 7 tasks
moepman opened this issue Jun 9, 2020 · 3 comments · Fixed by #11853
Closed
2 of 7 tasks

Comments

@moepman
Copy link

moepman commented Jun 9, 2020

  • Gitea version (or commit ref): 0.12.0-rc2
  • Git version: 2.20.1
  • Gogs version: 0.11.91
  • Operating system: Debian Buster (stable with all current updaes installed)
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant
  • Log gist:

Description

After migrating from gogs 0.11.91 to gitea 1.12.0-rc2 the "Repositories" list to the right is broken. It was still working with 1.11.6. It seems to be a filtering issue: if I select archived (✓) or not archived (-) it works - with the empty checkbox (which should list both archived and non-archived) I get an empty list as per the attached screenshot.

Steps taken for the migration:

Screenshots

gitea-repositories-empty

@moepman moepman changed the title Repository listing filter broken after upgrading from gogs to 0.12.0-rc2 Repository listing filter broken after upgrading from gogs 0.11.91 to gitea 1.12.0-rc2 Jun 9, 2020
@moepman
Copy link
Author

moepman commented Jun 10, 2020

I am not sure when the is_archived column was introduced to the repository table, it got added with a migration step but existing repositories did not get a default value of false.

The following SQL statement will fix the problem.

UPDAtE repository SET is_archived = false WHERE is_archived IS NULL;

@zeripath
Copy link
Contributor

OK it looks like we could add another migration v142.go which does this step.

Probably reasonable to do it as we never really want is_archived to be NULL

zeripath added a commit to zeripath/gitea that referenced this issue Jun 11, 2020
Fix go-gitea#11824

Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick added a commit that referenced this issue Jun 11, 2020
* Add migration to set IsArchived false if it is null

Fix #11824

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add doctor

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
zeripath added a commit to zeripath/gitea that referenced this issue Jun 11, 2020
…ort go-gitea#11853)

Partial backport of go-gitea#11853

Add doctor check to set IsArchived false if it is null.

(Migration change unfortunately not possible to be backported.)

Fix go-gitea#11824

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

For 1.12 unfortunately we can't backport the auto-migration but the gitea doctor command could be used to fix this.

techknowlogick pushed a commit that referenced this issue Jun 11, 2020
…ort #11853) (#11859)

Partial backport of #11853

Add doctor check to set IsArchived false if it is null.

(Migration change unfortunately not possible to be backported.)

Fix #11824

Signed-off-by: Andrew Thornton <art27@cantab.net>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
* Add migration to set IsArchived false if it is null

Fix go-gitea#11824

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Add doctor

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@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

Successfully merging a pull request may close this issue.

2 participants