You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: UserLinkAccount, pq: value is out of range for type bigint
When using Google OAuth, the UserID returned can be quite large, such as 1108672xxx5299468800. This value exceeds the limit of BigInt, leading to a 500 server error when processing it in the UpdateMigrationsByType function. This issue primarily arises from the following code snippet:
Where("repo_id IN (SELECT id FROM repository WHERE original_service_type = ?)", gitServiceType).
And("original_author_id = ?", originalAuthorID)
To resolve this, the column must be updated from BigInt to numeric. Here are the SQL commands to achieve this:
ALTER TABLE issue ALTER COLUMN original_author_id TYPE NUMERIC USING original_author_id::NUMERIC;
ALTER TABLE comment ALTER COLUMN original_author_id TYPE NUMERIC USING original_author_id::NUMERIC;
ALTER TABLE release ALTER COLUMN original_author_id TYPE NUMERIC USING original_author_id::NUMERIC;
ALTER TABLE reaction ALTER COLUMN original_author_id TYPE NUMERIC USING original_author_id::NUMERIC;
ALTER TABLE review ALTER COLUMN original_author_id TYPE NUMERIC USING original_author_id::NUMERIC;
Gitea Version
v1.22
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
2.39.3
Screenshots
No response
Git Version
No response
Operating System
Ubuntu
How are you running Gitea?
Built using source
Database
PostgreSQL
The text was updated successfully, but these errors were encountered:
Description
Error: UserLinkAccount, pq: value is out of range for type bigint
When using Google OAuth, the UserID returned can be quite large, such as 1108672xxx5299468800. This value exceeds the limit of BigInt, leading to a 500 server error when processing it in the UpdateMigrationsByType function. This issue primarily arises from the following code snippet:
To resolve this, the column must be updated from BigInt to numeric. Here are the SQL commands to achieve this:
Gitea Version
v1.22
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
2.39.3
Screenshots
No response
Git Version
No response
Operating System
Ubuntu
How are you running Gitea?
Built using source
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: