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

Add support for altering columns to SQLite #4322

Merged
merged 5 commits into from Feb 26, 2021

Conversation

nickrum
Copy link
Contributor

@nickrum nickrum commented Feb 26, 2021

The approach I took to parse CREATE INDEX statements using regexes was unfortunately not flexible and robust enough to properly parse CREATE TABLE statements. I replaced it with a tokenizer and parser combinators. The grammar is based on the SQLite documentation.

Any idea where the formatDefault() function would fit? It is currently directly inside the ColumnCompiler class which doesn't feel right.

@kibertoad
Copy link
Collaborator

Unit tests seem to be failing now.

@nickrum
Copy link
Contributor Author

nickrum commented Feb 26, 2021

Very strange... This seems to be caused by requiring Raw inside formatterUtils. Any idea what the actual cause of this is and how to fix it?

@kibertoad
Copy link
Collaborator

@nickrum I would imagine a circular dependency happening.

@nickrum
Copy link
Contributor Author

nickrum commented Feb 26, 2021

@kibertoad Good catch, Raw is indeed circularly depended upon.

@kibertoad kibertoad merged commit 9e28a72 into knex:master Feb 26, 2021
@kibertoad
Copy link
Collaborator

Thanks!

@nickrum nickrum deleted the sqlite-alter-column-feature branch February 26, 2021 21:42
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