-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
MSSQL, Error: sync database struct error: mssql: Invalid object name 'SYS.INDEXES'. #13615
Closed
2 of 7 tasks
Labels
Comments
Ah I think this might be due to the capitalisation. WHY MSSQL WHY? |
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
Aug 6, 2021
This fixes two problems with MSSQL: * `ALTER TABLE DROP ... IF EXISTS ...` is only supported in SQL Server >16. The `IF EXISTS` here is a belt-and-braces and does not need to be present. Therefore can be dropped. Also stop attempting to drop the indexes as constraints as they're indexes! * System tables like: `sys.indexes` should be lowercase not uppercase because of collation issues. Fix go-gitea#13615 Signed-off-by: Andrew Thornton <[email protected]>
lafriks
pushed a commit
that referenced
this issue
Aug 8, 2021
This fixes two problems with MSSQL: * `ALTER TABLE DROP ... IF EXISTS ...` is only supported in SQL Server >16. The `IF EXISTS` here is a belt-and-braces and does not need to be present. Therefore can be dropped. Also stop attempting to drop the indexes as constraints as they're indexes! * System tables like: `sys.indexes` should be lowercase not uppercase because of collation issues. Fix #13615 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
@lunny this is a XORM bug. When you use "CS_AS" collation for the MSSQL database, you should use "SELECT * FROM sys.indexes" but not "SYS.INDEXES" |
lunny
added
type/bug
type/upstream
This is an issue in one of Gitea's dependencies and should be reported there
labels
Dec 31, 2023
Fixed by https://gitea.com/xorm/xorm/pulls/2389 and merged into Gitea. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
[x]
):Description
I am trying to install gitea 1.12.6 on SQL Server 2017. I have database and user using the following query:
When I click 'Install Gitea' from localhost:3000, a bunch of tables are generated in the database but then I get the below error.
...
Log
The text was updated successfully, but these errors were encountered: