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

SQLite parser improvements #4333

Merged
merged 4 commits into from
Mar 2, 2021
Merged

Conversation

nickrum
Copy link
Contributor

@nickrum nickrum commented Mar 2, 2021

The first two commits should be self explanatory.

The third commit adds support for the NULL column constraint to the SQLite create table parser and compiler. This constraint is not mentioned in the SQLite documentation because it is a no-op. SQLite only parses it for compatibility reasons. As Knex sets this constraint on columns created with .nullable(), we have to parse it as well.
The alternativ would be to not set this constraint on nullable columns and to not parse it. Unfortunately, this would make altering columns on existing databases with nullable columns (and on those created with a raw query using the null constraint) impossible.

@kibertoad kibertoad merged commit 3e6176a into knex:master Mar 2, 2021
@kibertoad
Copy link
Collaborator

Great job as usual!

@nickrum nickrum deleted the sqlite-parser-improvements branch March 2, 2021 22:53
@nickrum
Copy link
Contributor Author

nickrum commented Mar 2, 2021

Thank you, I'm doing my best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants