upgrade to 1.21.0 view repo on web gives 500 error: GetRecentlyPushedBranches, mssql: Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "Latin1_General_CI_AS" in the equal to operation. #12025

Closed
opened 2025-11-02 09:54:57 -06:00 by GiteaMirror · 19 comments
Owner

Originally created by @shanepowell on GitHub (Nov 15, 2023).

Description

After upgrading to 1.21.0 and starting the service. Trying to view any repo on the web site displays the following error:

500

GetRecentlyPushedBranches, mssql: Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "Latin1_General_CI_AS" in the equal to operation.

In the log I see:
2023/11/16 07:20:39 ...eb/routing/logger.go:102:func1() [I] router: completed POST /IPFX/OnTrackWeb.git/git-upload-pack for 10.4.0.15:60717, 200 OK in 2586.4ms @ repo/githttp.go:492(repo.ServiceUploadPack)
2023/11/16 07:20:41 ...ers/web/repo/view.go:1000:renderCode() [E] GetRecentlyPushedBranches: mssql: Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "Latin1_General_CI_AS" in the equal to operation.

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Setup:

  • Local Windows Server
  • MSSQL Server running on the same machine

GITEA is installed via chocolatey. So the upgrade was just 'choco upgrade gitea' stop/starting the service around the command.

Database

MSSQL

Originally created by @shanepowell on GitHub (Nov 15, 2023). ### Description After upgrading to 1.21.0 and starting the service. Trying to view any repo on the web site displays the following error: 500 GetRecentlyPushedBranches, mssql: Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "Latin1_General_CI_AS" in the equal to operation. In the log I see: 2023/11/16 07:20:39 ...eb/routing/logger.go:102:func1() [I] router: completed POST /IPFX/OnTrackWeb.git/git-upload-pack for 10.4.0.15:60717, 200 OK in 2586.4ms @ repo/githttp.go:492(repo.ServiceUploadPack) 2023/11/16 07:20:41 ...ers/web/repo/view.go:1000:renderCode() [E] GetRecentlyPushedBranches: mssql: Cannot resolve the collation conflict between "Latin1_General_CS_AS" and "Latin1_General_CI_AS" in the equal to operation. ### Gitea Version 1.21.0 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Setup: * Local Windows Server * MSSQL Server running on the same machine GITEA is installed via chocolatey. So the upgrade was just 'choco upgrade gitea' stop/starting the service around the command. ### Database MSSQL
GiteaMirror added the type/bugissue/workaround labels 2025-11-02 09:54:57 -06:00
Author
Owner

@KazzmanK commented on GitHub (Nov 15, 2023):

As per

	subQuery := builder.Select("head_branch").From("pull_request").
		InnerJoin("issue", "issue.id = pull_request.issue_id").
		Where(builder.Eq{
			"pull_request.head_repo_id": repoID,
			"issue.is_closed":           false,
		})
	err := db.GetEngine(ctx).
		Where("pusher_id=? AND is_deleted=?", userID, false).
		And("name <> ?", excludeBranchName).
		And("repo_id = ?", repoID).
		And("commit_time >= ?", time.Now().Add(-time.Hour*6).Unix()).
		NotIn("name", subQuery).
		OrderBy("branch.commit_time DESC").
		Limit(2).
		Find(&branches)

somewhere in this query column collation is different from server collation, or other table collation, resulting in error.
To be absolutely sure, please share your server collation and column collations for tables pull_request and issue

@KazzmanK commented on GitHub (Nov 15, 2023): As per ``` subQuery := builder.Select("head_branch").From("pull_request"). InnerJoin("issue", "issue.id = pull_request.issue_id"). Where(builder.Eq{ "pull_request.head_repo_id": repoID, "issue.is_closed": false, }) err := db.GetEngine(ctx). Where("pusher_id=? AND is_deleted=?", userID, false). And("name <> ?", excludeBranchName). And("repo_id = ?", repoID). And("commit_time >= ?", time.Now().Add(-time.Hour*6).Unix()). NotIn("name", subQuery). OrderBy("branch.commit_time DESC"). Limit(2). Find(&branches) ``` somewhere in this query column collation is different from server collation, or other table collation, resulting in error. To be absolutely sure, please share your server collation and column collations for tables `pull_request` and `issue`
Author
Owner

@SoulSeekkor commented on GitHub (Nov 15, 2023):

If it helps I also have an instance of Gitea running on Windows Server and MSSQL. Currently haven't upgraded yet and still on 1.20.4, but the collation for the database and all text columns in those two tables is SQL_Latin1_General_CP1_CI_AS for us.

@SoulSeekkor commented on GitHub (Nov 15, 2023): If it helps I also have an instance of Gitea running on Windows Server and MSSQL. Currently haven't upgraded yet and still on 1.20.4, but the collation for the database and all text columns in those two tables is SQL_Latin1_General_CP1_CI_AS for us.
Author
Owner

@shanepowell commented on GitHub (Nov 16, 2023):

For me, both those tables as: Latin1_General_CI_AS

@shanepowell commented on GitHub (Nov 16, 2023): For me, both those tables as: Latin1_General_CI_AS
Author
Owner

@R3DST0RM commented on GitHub (Nov 16, 2023):

I do get the same error but with different collation:

GetRecentlyPushedBranches, Error 1267 (HY000): Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

pull request and issue have utf8mb4_general_ci as column and table collation.

Edit:

It seems, that running gitea doctor convert is able to fix the issue

@R3DST0RM commented on GitHub (Nov 16, 2023): I do get the same error but with different collation: ```bash GetRecentlyPushedBranches, Error 1267 (HY000): Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' ``` `pull request` and `issue` have `utf8mb4_general_ci` as column and table collation. Edit: It seems, that running `gitea doctor convert` is able to fix the issue
Author
Owner

@KazzmanK commented on GitHub (Nov 16, 2023):

What is database collation

SELECT name, collation_name  
FROM sys.databases 

and server collation
select convert(sysname, serverproperty(N'collation')) AS [Collation]

@KazzmanK commented on GitHub (Nov 16, 2023): What is database collation ``` SELECT name, collation_name FROM sys.databases ``` and server collation ` select convert(sysname, serverproperty(N'collation')) AS [Collation] `
Author
Owner

@KazzmanK commented on GitHub (Nov 16, 2023):

If you run DOCTOR , what is the new outcome of said collations ?

From my perspective, mixing collations in MSSQL is troublesome and exceptional to some specific requirements.

Selever collation
select convert(sysname, serverproperty(N'collation')) AS [Collation]
should match database default collation
SELECT name, collation_name FROM sys.databases
and all tables should be with same collation too
select distinct COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS where COLLATION_NAME is not null

If they are not, anytime it can lead to errors with collation mix.
So , queries must be updated to convert collation or table columns have to be modified

@KazzmanK commented on GitHub (Nov 16, 2023): If you run DOCTOR , what is the new outcome of said collations ? From my perspective, mixing collations in MSSQL is troublesome and exceptional to some specific requirements. Selever collation `select convert(sysname, serverproperty(N'collation')) AS [Collation]` should match database default collation `SELECT name, collation_name FROM sys.databases` and all tables should be with same collation too `select distinct COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS where COLLATION_NAME is not null` If they are not, anytime it can lead to errors with collation mix. So , queries must be updated to convert collation or table columns have to be modified
Author
Owner

@R3DST0RM commented on GitHub (Nov 16, 2023):

Using doctor all tables and columns got converted to utf8mb4_general_ci (which in my case is for MySQL)

@R3DST0RM commented on GitHub (Nov 16, 2023): Using doctor all tables and columns got converted to `utf8mb4_general_ci` (which in my case is for MySQL)
Author
Owner

@KazzmanK commented on GitHub (Nov 16, 2023):

for MySql there were changes, especially for utf8mb4

@KazzmanK commented on GitHub (Nov 16, 2023): for MySql there were changes, especially for utf8mb4
Author
Owner

@SoulSeekkor commented on GitHub (Nov 16, 2023):

For me the server collation, databases, and columns are all SQL_Latin1_General_CP1_CI_AS. This is with SQL Server 2019. I haven't done anything with gitea doctor yet, I haven't seen that before.

@SoulSeekkor commented on GitHub (Nov 16, 2023): For me the server collation, databases, and columns are all SQL_Latin1_General_CP1_CI_AS. This is with SQL Server 2019. I haven't done anything with gitea doctor yet, I haven't seen that before.
Author
Owner

@lunny commented on GitHub (Nov 16, 2023):

For me the server collation, databases, and columns are all SQL_Latin1_General_CP1_CI_AS. This is with SQL Server 2019. I haven't done anything with gitea doctor yet, I haven't seen that before.

gitea doctor will only fix mysql charactor problem.

@lunny commented on GitHub (Nov 16, 2023): > For me the server collation, databases, and columns are all SQL_Latin1_General_CP1_CI_AS. This is with SQL Server 2019. I haven't done anything with gitea doctor yet, I haven't seen that before. gitea doctor will only fix mysql charactor problem.
Author
Owner

@lunny commented on GitHub (Nov 16, 2023):

Please check wether all the columns collation are the same.

SELECT
    col.name, col.collation_name
FROM 
    sys.columns col
WHERE
    object_id = OBJECT_ID('branch')

If all the column's collations are the same, then check another two tables pull_request and issue like above.

@lunny commented on GitHub (Nov 16, 2023): Please check wether all the columns collation are the same. ```sql SELECT col.name, col.collation_name FROM sys.columns col WHERE object_id = OBJECT_ID('branch') ``` If all the column's collations are the same, then check another two tables `pull_request` and `issue` like above.
Author
Owner

@shanepowell commented on GitHub (Nov 16, 2023):

SELECT name, collation_name
FROM sys.databases

Output:
master Latin1_General_CS_AS
tempdb Latin1_General_CS_AS
model Latin1_General_CS_AS
msdb Latin1_General_CS_AS
gitea Latin1_General_CI_AS

select convert(sysname, serverproperty(N'collation')) AS [Collation]

Output:
Latin1_General_CS_AS

SELECT
col.name, col.collation_name
FROM
sys.columns col
WHERE
object_id = OBJECT_ID('branch')

Output:
id NULL
repo_id NULL
name Latin1_General_CI_AS
commit_id Latin1_General_CI_AS
commit_message Latin1_General_CI_AS
pusher_id NULL
is_deleted NULL
deleted_by_id NULL
deleted_unix NULL
commit_time NULL
created_unix NULL
updated_unix NULL

SELECT
col.name, col.collation_name
FROM
sys.columns col
WHERE
object_id = OBJECT_ID('pull_request')

Output:
id NULL
type NULL
status NULL
conflicted_files Latin1_General_CS_AS
commits_ahead NULL
commits_behind NULL
changed_protected_files Latin1_General_CS_AS
issue_id NULL
index NULL
head_repo_id NULL
base_repo_id NULL
head_branch Latin1_General_CS_AS
base_branch Latin1_General_CS_AS
merge_base Latin1_General_CS_AS
allow_maintainer_edit NULL
has_merged NULL
merged_commit_id Latin1_General_CS_AS
merger_id NULL
merged_unix NULL
flow NULL

SELECT
col.name, col.collation_name
FROM
sys.columns col
WHERE
object_id = OBJECT_ID('issue')

Output:
id NULL
repo_id NULL
index NULL
poster_id NULL
original_author Latin1_General_CS_AS
original_author_id NULL
name Latin1_General_CS_AS
content Latin1_General_CS_AS
milestone_id NULL
priority NULL
is_closed NULL
is_pull NULL
num_comments NULL
ref Latin1_General_CS_AS
deadline_unix NULL
created_unix NULL
updated_unix NULL
closed_unix NULL
is_locked NULL
pin_order NULL

I don't know how to run gitea doctor so someone will have to point me to something on how to run that if you think I need to.

@shanepowell commented on GitHub (Nov 16, 2023): SELECT name, collation_name FROM sys.databases Output: master Latin1_General_CS_AS tempdb Latin1_General_CS_AS model Latin1_General_CS_AS msdb Latin1_General_CS_AS gitea Latin1_General_CI_AS select convert(sysname, serverproperty(N'collation')) AS [Collation] Output: Latin1_General_CS_AS SELECT col.name, col.collation_name FROM sys.columns col WHERE object_id = OBJECT_ID('branch') Output: id NULL repo_id NULL name Latin1_General_CI_AS commit_id Latin1_General_CI_AS commit_message Latin1_General_CI_AS pusher_id NULL is_deleted NULL deleted_by_id NULL deleted_unix NULL commit_time NULL created_unix NULL updated_unix NULL SELECT col.name, col.collation_name FROM sys.columns col WHERE object_id = OBJECT_ID('pull_request') Output: id NULL type NULL status NULL conflicted_files Latin1_General_CS_AS commits_ahead NULL commits_behind NULL changed_protected_files Latin1_General_CS_AS issue_id NULL index NULL head_repo_id NULL base_repo_id NULL head_branch Latin1_General_CS_AS base_branch Latin1_General_CS_AS merge_base Latin1_General_CS_AS allow_maintainer_edit NULL has_merged NULL merged_commit_id Latin1_General_CS_AS merger_id NULL merged_unix NULL flow NULL SELECT col.name, col.collation_name FROM sys.columns col WHERE object_id = OBJECT_ID('issue') Output: id NULL repo_id NULL index NULL poster_id NULL original_author Latin1_General_CS_AS original_author_id NULL name Latin1_General_CS_AS content Latin1_General_CS_AS milestone_id NULL priority NULL is_closed NULL is_pull NULL num_comments NULL ref Latin1_General_CS_AS deadline_unix NULL created_unix NULL updated_unix NULL closed_unix NULL is_locked NULL pin_order NULL I don't know how to run gitea doctor so someone will have to point me to something on how to run that if you think I need to.
Author
Owner

@daddy32 commented on GitHub (Nov 21, 2023):

I'm running gitea in docker.
When I run docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert, I get an error:
...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission.

When running without root, I get another - permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:.

I'm sure I'm doing something wrong :) But what?

@daddy32 commented on GitHub (Nov 21, 2023): I'm running gitea in docker. When I run `docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert`, I get an error: `...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission`. When running without root, I get another - `permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:`. I'm sure I'm doing something wrong :) But what?
Author
Owner

@labronic commented on GitHub (Feb 26, 2024):

I'm running gitea in docker. When I run docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert, I get an error: ...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission.

When running without root, I get another - permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:.

I'm sure I'm doing something wrong :) But what?

Attempt to log into the container, typically using the command docker exec -ti <name of your Gitea container> /bin/bash. Once inside, execute the command su git, followed by gitea doctor convert.
Unfortunately, in my case, the result was as follows:
gitea doctor convert
2024/02/26 07:57:55 ...md/doctor_convert.go:32:runDoctorConvert() [I] AppPath: /usr/local/bin/gitea
2024/02/26 07:57:55 ...md/doctor_convert.go:33:runDoctorConvert() [I] AppWorkPath: /data/gitea
2024/02/26 07:57:55 ...md/doctor_convert.go:34:runDoctorConvert() [I] Custom path: /data/gitea
2024/02/26 07:57:55 ...md/doctor_convert.go:35:runDoctorConvert() [I] Log path: /data/gitea/log
2024/02/26 07:57:55 ...md/doctor_convert.go:36:runDoctorConvert() [I] Configuration file: /data/gitea/conf/app.ini
2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] SELECT 'ALTER TABLE ' + OBJECT_NAME(SC.object_id) + ' MODIFY SC.name NVARCHAR(' + CONVERT(VARCHAR(5),SC.max_length) + ')'
FROM SYS.columns SC
JOIN SYS.types ST
ON SC.system_type_id = ST.system_type_id
AND SC.user_type_id = ST.user_type_id
WHERE ST.name ='varchar' [] - 56.781156ms
2024/02/26 07:57:55 ...md/doctor_convert.go:47:runDoctorConvert() [F] Failed to convert database from varchar to nvarchar: mssql: Incorrect syntax near 'MODIFY'.
2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] ALTER TABLE upload MODIFY SC.name NVARCHAR(40) [] - 4.071094ms

Version Gitea: 1.21.6

@labronic commented on GitHub (Feb 26, 2024): > I'm running gitea in docker. When I run `docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert`, I get an error: `...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission`. > > When running without root, I get another - `permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:`. > > I'm sure I'm doing something wrong :) But what? Attempt to log into the container, typically using the command `docker exec -ti <name of your Gitea container> /bin/bash.` Once inside, execute the command `su git,` followed by `gitea doctor convert.` Unfortunately, in my case, the result was as follows: gitea doctor convert 2024/02/26 07:57:55 ...md/doctor_convert.go:32:runDoctorConvert() [I] AppPath: /usr/local/bin/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:33:runDoctorConvert() [I] AppWorkPath: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:34:runDoctorConvert() [I] Custom path: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:35:runDoctorConvert() [I] Log path: /data/gitea/log 2024/02/26 07:57:55 ...md/doctor_convert.go:36:runDoctorConvert() [I] Configuration file: /data/gitea/conf/app.ini 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] SELECT 'ALTER TABLE ' + OBJECT_NAME(SC.object_id) + ' MODIFY SC.name NVARCHAR(' + CONVERT(VARCHAR(5),SC.max_length) + ')' FROM SYS.columns SC JOIN SYS.types ST ON SC.system_type_id = ST.system_type_id AND SC.user_type_id = ST.user_type_id WHERE ST.name ='varchar' [] - 56.781156ms 2024/02/26 07:57:55 ...md/doctor_convert.go:47:runDoctorConvert() [F] Failed to convert database from varchar to nvarchar: mssql: Incorrect syntax near 'MODIFY'. 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] ALTER TABLE upload MODIFY SC.name NVARCHAR(40) [] - 4.071094ms Version Gitea: 1.21.6
Author
Owner

@lunny commented on GitHub (Feb 26, 2024):

I'm running gitea in docker. When I run docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert, I get an error: ...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission.
When running without root, I get another - permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:.
I'm sure I'm doing something wrong :) But what?

Attempt to log into the container, typically using the command docker exec -ti <name of your Gitea container> /bin/bash. Once inside, execute the command su git, followed by gitea doctor convert. Unfortunately, in my case, the result was as follows: gitea doctor convert 2024/02/26 07:57:55 ...md/doctor_convert.go:32:runDoctorConvert() [I] AppPath: /usr/local/bin/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:33:runDoctorConvert() [I] AppWorkPath: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:34:runDoctorConvert() [I] Custom path: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:35:runDoctorConvert() [I] Log path: /data/gitea/log 2024/02/26 07:57:55 ...md/doctor_convert.go:36:runDoctorConvert() [I] Configuration file: /data/gitea/conf/app.ini 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] SELECT 'ALTER TABLE ' + OBJECT_NAME(SC.object_id) + ' MODIFY SC.name NVARCHAR(' + CONVERT(VARCHAR(5),SC.max_length) + ')' FROM SYS.columns SC JOIN SYS.types ST ON SC.system_type_id = ST.system_type_id AND SC.user_type_id = ST.user_type_id WHERE ST.name ='varchar' [] - 56.781156ms 2024/02/26 07:57:55 ...md/doctor_convert.go:47:runDoctorConvert() [F] Failed to convert database from varchar to nvarchar: mssql: Incorrect syntax near 'MODIFY'. 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] ALTER TABLE upload MODIFY SC.name NVARCHAR(40) [] - 4.071094ms

Version Gitea: 1.21.6

What's your mssql version?

@lunny commented on GitHub (Feb 26, 2024): > > I'm running gitea in docker. When I run `docker exec srv-captain--git.1.jeglmys2pdkv7v05q7inewhlc gitea doctor convert`, I get an error: `...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission`. > > When running without root, I get another - `permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:`. > > I'm sure I'm doing something wrong :) But what? > > Attempt to log into the container, typically using the command `docker exec -ti <name of your Gitea container> /bin/bash.` Once inside, execute the command `su git,` followed by `gitea doctor convert.` Unfortunately, in my case, the result was as follows: gitea doctor convert 2024/02/26 07:57:55 ...md/doctor_convert.go:32:runDoctorConvert() [I] AppPath: /usr/local/bin/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:33:runDoctorConvert() [I] AppWorkPath: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:34:runDoctorConvert() [I] Custom path: /data/gitea 2024/02/26 07:57:55 ...md/doctor_convert.go:35:runDoctorConvert() [I] Log path: /data/gitea/log 2024/02/26 07:57:55 ...md/doctor_convert.go:36:runDoctorConvert() [I] Configuration file: /data/gitea/conf/app.ini 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] SELECT 'ALTER TABLE ' + OBJECT_NAME(SC.object_id) + ' MODIFY SC.name NVARCHAR(' + CONVERT(VARCHAR(5),SC.max_length) + ')' FROM SYS.columns SC JOIN SYS.types ST ON SC.system_type_id = ST.system_type_id AND SC.user_type_id = ST.user_type_id WHERE ST.name ='varchar' [] - 56.781156ms 2024/02/26 07:57:55 ...md/doctor_convert.go:47:runDoctorConvert() [F] Failed to convert database from varchar to nvarchar: mssql: Incorrect syntax near 'MODIFY'. 2024/02/26 07:57:55 cmd/main.go:117:func1() [I] [SQL] ALTER TABLE upload MODIFY SC.name NVARCHAR(40) [] - 4.071094ms > > Version Gitea: 1.21.6 What's your mssql version?
Author
Owner

@labronic commented on GitHub (Feb 26, 2024):

Hi,
my sql version is 2017

@labronic commented on GitHub (Feb 26, 2024): Hi, my sql version is 2017
Author
Owner

@lunny commented on GitHub (Mar 27, 2024):

I think this should be resolved by #29238

@lunny commented on GitHub (Mar 27, 2024): I think this should be resolved by #29238
Author
Owner

@wxiaoguang commented on GitHub (Mar 27, 2024):

I think this should be resolved by #29238

It is not really resolved. Site admin needs to manually convert their database tables/columns to the same collation. There is not builtin tool in Gitea to do the converting.

@wxiaoguang commented on GitHub (Mar 27, 2024): > I think this should be resolved by #29238 It is not really resolved. Site admin needs to manually convert their database tables/columns to the same collation. There is not builtin tool in Gitea to do the converting.
Author
Owner

@lunny commented on GitHub (Sep 3, 2024):

I think this can be resolved by manually converting the collebrations.

@lunny commented on GitHub (Sep 3, 2024): I think this can be resolved by manually converting the collebrations.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12025