Skip to content
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

directus boostrap fails if the collation of the sql server is case sensitive #8290

Closed
3 tasks done
arminYer opened this issue Sep 24, 2021 · 5 comments
Closed
3 tasks done

Comments

@arminYer
Copy link

Preflight Checklist

Describe the Bug

In the boostrap the information_schema view will be queried like this:

SELECT * FROM [information_schema].[tables]Latin1_General_100_CI_AS
SELECT * FROM [information_schema].[tables]Latin1_General_100_CS_AS

To Reproduce

SQL Server instance with a case sensitive collation

What version of Directus are you using?

9.0.0-rc.94

What version of Node.js are you using?

16.0.0

What database are you using?

SQL SERVER 2019

What browser are you using?

...

What operating system are you using?

Windows

How are you deploying Directus?

locally

@joselcvarela
Copy link
Member

joselcvarela commented Sep 24, 2021

Is this the error you are facing?


19:12:50 ✨ Initializing bootstrap...
RequestError: select top (@p0) count(*) as [count] from [information_schema].[tables] where [TABLE_CATALOG] = @p1 and [table_name] = @p2 and [TABLE_SCHEMA] = @p3 - Invalid object name 'information_schema.tables'.
    at Parser.<anonymous> (/home/##/workspace/directus/directus/node_modules/tedious/lib/connection.js:1175:27)
    at Parser.emit (node:events:394:28)
    at Parser.emit (node:domain:475:12)
    at Readable.<anonymous> (/home/##/workspace/directus/directus/node_modules/tedious/lib/token/token-stream-parser.js:27:14)
    at Readable.emit (node:events:394:28)
    at Readable.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:312:12)
    at readableAddChunk (node:internal/streams/readable:287:9)
    at Readable.push (node:internal/streams/readable:226:10)
    at next (node:internal/streams/from:98:31) {
  code: 'EREQUEST',
  number: 208,
  state: 1,
  class: 16,
  serverName: '90edce07376e',
  procName: '',
  lineNumber: 1
}

@joselcvarela
Copy link
Member

@rijkvanzanten I think this issue is already being tracked on package repository
tediousjs/tedious#1195

Should I close since this is not a bug of Directus itself?

@rijkvanzanten
Copy link
Member

@joselcvarela That issue isn't exactly the same though. The other issue is around connecting to the database. In the above error, that is seemingly working. The error here Invalid object name 'information_schema.tables'. indicates that SQL Server doesn't play nicely with that naming convention. Maybe it's supposed to be uppercased across the board?

@joselcvarela
Copy link
Member

joselcvarela commented Sep 27, 2021

This issue maybe solved by this PR:
knex/knex-schema-inspector#71

@rijkvanzanten
Copy link
Member

rijkvanzanten commented Sep 27, 2021

Should be resolved by knex/knex-schema-inspector#71 & #8345. We can reopen if the problem persists 👍🏻

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants