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

Database changes in 0.12.11? #7724

Open
tcroes opened this issue Apr 12, 2024 Discussed in #7723 · 1 comment
Open

Database changes in 0.12.11? #7724

tcroes opened this issue Apr 12, 2024 Discussed in #7723 · 1 comment

Comments

@tcroes
Copy link

tcroes commented Apr 12, 2024

Discussed in #7723

Originally posted by tcroes April 10, 2024
We recently upgraded from 0.11.34 to 0.11.91 and then to 0.12.11 (in the same evening - in the event timing is an issue). We also use an external LDAP authentication source. We're using mysql.

We are seeing a 500 error when trying to set the LDAP authentication method as default:
Error 1054: Unknown column 'is_default' in 'field list'

We see the same error if we try to add a new LDAP auth method.

Could we have missed a set of necessary database migration changes?

@GwynethLlewelyn
Copy link

... and soon you will be upgrading to 0.13, hopefully :)

Anyway, I have no idea when the database was changed, and why the automatic procedure failed, since I'm just a humble user with little to zero experience in hacking the complex Gogs code.

However, it's clear that this error is thrown by MySQL when there is a problem with a missing or mistyped column.

Looking at the Gogs source code documentation for developers, it does indeed seem that table login_source has a column is_default— and I can confirm it on my own installation (which, however, has already been upgraded to 0.13), although phpMyAdmin reports it as a tinyint(1). It's nullable and the default value is 0.

So maybe all you need to do is to manually add that column with the specified parameters and see what happens?... note that adding columns should be pretty much harmless, just wasting a bit of space on the database. It's missing columns that's dangerous!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants