-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
JSONB Array in existing schema stops app loading #8770
Comments
It seems to fail in the step where knex-schema-inspector tries reading the default value as JSON, as it wrongly recognizes JSONB as JSON. It's technically a bug in knex-schema-inspector but we can leave this open as a reminder to fix it there 👍🏻 |
This bit needs a try/catch, or explicitly check against JSONB vs JSON |
I can try to solve this in the |
Much appreciated @ntma! |
We'll keep tracking this in knex/knex-schema-inspector#72 👍🏻 |
Preflight Checklist
Describe the Bug
I have an existing app and existing database that I'm trying to use with Directus.
One of the fields is a JSONB array field.
Directus throws the following errors when trying to load the login page.
I do not need access to the table or field in Directus.
But I do need Directus to run even if the field type is not supported.
The table does not have a primary key, so Directus ignores it anyway.
⚠️ Collection "oban_jobs" doesn't have a primary key column and will be ignored
p.s I'm blown away with Directus so far. I love the fact I can layer it on top of an existing application.
To Reproduce
If you delete the field "errors". The login page will load.
SQL to create table with problem jsonb array field
What version of Directus are you using?
9.0.0-rc.96 (Docker: directus/directus:latest)
What version of Node.js are you using?
16.10.0 (Docker: directus/directus:latest)
What database are you using?
Postgres 14 (Docker: postgres:latest)
What browser are you using?
Chrome
What operating system are you using?
Linux Manjaro
How are you deploying Directus?
Locally via Docker
The text was updated successfully, but these errors were encountered: