Skip to content

Database script fails on case sensitive SQL Server #1239

@migoldfinger

Description

@migoldfinger

Before submitting your issue, please verify the following.

  • You're using the latest Stable or Daily version of Shoko Server.
  • You're using the latest and correct (Stable:Stable, Daily:Daily) Web UI for the version of Shoko you're using.
  • You've searched this repository (top of the page) for the issue you are reporting.

Shoko Version

5.1.0.0

Shoko Version - Daily Commit

No response

Install Type

Windows

Description

I tried setting up Shoko on my MSSQL Server instance.
My Server Is setup to be case sensitive on DatabaseObjects.
The Script fails when trying to alter the table jmmuser which is clear since the correct table name is JMMUser

Steps to Reproduce

Setup a case sensitive SQL server.
Change the shoko config to use sql server
Start shoko.

Log File

atabase Error : DATABASE ERROR: 8.1 ALTER TABLE jmmuser ALTER COLUMN Password NVARCHAR(150) NULL | Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot find the object "jmmuser" because it does not exist or you do not have permissions. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean isAsync, Int32 timeout, Boolean asyncWrite) at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry, String methodName) at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Shoko.Server.Databases.SQLServer.Execute(SqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\SQLServer.cs:line 1132 at Shoko.Server.Databases.SQLServer.ExecuteCommand(SqlConnection connection, String command) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Databases\SQLServer.cs:line 1118 ClientConnectionId:a4dafd7b-94eb-4f43-86ae-110a5d6f05a1 Error Number:4902,State:1,Class:16 Notify developers about this error, it will be logged in your logs

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions