Missing enable_whitelist column on v111 migration #4854

Closed
opened 2025-11-02 06:05:02 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @blemasle on GitHub (Feb 14, 2020).

Description

During an update from 1.1.2 to 1.11.0, the v111 migration failed because no enable_whitelist was present in my protected_branch table.

I looked through migration files but couldn't find the addition of that column to the table, and the migration ProtectedBranch struct has no related field either. I had to add that column manually on my SQLite database : alter table protected_branch add column enable_whitelist boolean NOT NULL DEFAULT false;

Not sure if this is related to my gitea installation somehow (which came from the beginning of gogs years go, then gitea etc).

Originally created by @blemasle on GitHub (Feb 14, 2020). - Gitea version (or commit ref): v1.11.0 - Git version: 2.11.0 - Operating system: Debian GNU/Linux 9 (stretch) - Database : - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: https://gist.github.com/blemasle/c992db8fcef26f889e5c7114bb29b3d0 ## Description During an update from 1.1.2 to 1.11.0, the [v111](https://github.com/go-gitea/gitea/blob/master/models/migrations/v111.go) migration failed because no `enable_whitelist` was present in my `protected_branch` table. I looked through migration files but couldn't find the addition of that column to the table, and the migration [`ProtectedBranch` struct](https://github.com/go-gitea/gitea/blob/master/models/migrations/v111.go#L15) has no related field either. I had to add that column manually on my SQLite database : `alter table protected_branch add column enable_whitelist boolean NOT NULL DEFAULT false;` Not sure if this is related to my gitea installation somehow (which came from the beginning of gogs years go, then gitea etc).
Author
Owner

@davidsvantesson commented on GitHub (Feb 14, 2020):

enable_whitelist has existed for 2 years, since version 1.3.0. It seem to be correct that a migration step for it was missing. It has been some discussion on not supporting direct upgrade from very old installations (maybe that is for 1.12).

@davidsvantesson commented on GitHub (Feb 14, 2020): `enable_whitelist` has existed for 2 years, since version 1.3.0. It seem to be correct that a migration step for it was missing. It has been some discussion on not supporting direct upgrade from very old installations (maybe that is for 1.12).
Author
Owner

@jolheiser commented on GitHub (Feb 14, 2020):

Yes, it will be in 1.12. The PR is #10026.

Until then, our recommendation is to update incrementally to each latest point release until 1.6 and then you can jump to the newest version.

@jolheiser commented on GitHub (Feb 14, 2020): Yes, it will be in `1.12`. The PR is #10026. Until then, our recommendation is to update incrementally to each latest point release until `1.6` and then you can jump to the newest version.
Author
Owner

@blemasle commented on GitHub (Feb 16, 2020):

Wow, I didn't realize my installation was that old. I was on the verge to suggest adding this to the documentation, but realized it is already there under the misleading "From gogs" section.

It might be a good idea to create another section on that documentation. I didn't check that page because I was coming from an old version of gitea, not gogs :)

@blemasle commented on GitHub (Feb 16, 2020): Wow, I didn't realize my installation was that old. I was on the verge to suggest adding this to the documentation, but realized it is already there under the misleading "From gogs" section. It might be a good idea to create another section on that documentation. I didn't check that page because I was coming from an old version of gitea, not gogs :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4854