Daniel15 / simple-nuget-server

A very simple PHP NuGet server
MIT License
116 stars 43 forks source link

Added 'COLLATE NOCASE' to findByID #41

Closed oletolshave closed 5 years ago

oletolshave commented 5 years ago

Using simple-nuget-ser as nuget server (running on the default SQLite in docker) and doing a "dotnet tool install ..." the install woud fail because the package could not be found.

I traced it down to "dotnet tool install" trying to find an all lowercase version of the package. I think the nuget api is supposed to be case IN-sensitive, so I guess this is a bug in simple-nuget-server.

Adding "COLLATE NOCASE" to the lookup makes "dotnet tool install" happy.

loic-sharma commented 5 years ago

I traced it down to "dotnet tool install" trying to find an all lowercase version of the package. I think the nuget api is supposed to be case IN-sensitive, so I guess this is a bug in simple-nuget-server.

NuGet.org's package ID database column is indeed case insensitive 👍

Daniel15 commented 5 years ago

It's probably better to do this in the CREATE TABLE statement, but that wouldn't affect existing databases (of course). This seems reasonable to me. Thanks!