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

Implement nullability modification via schema builder #4657

Merged
merged 1 commit into from Aug 28, 2021

Conversation

kibertoad
Copy link
Collaborator

Refreshed version of #1327 by @wubzz

fixes #1218

Note that old solution of table.string('checksum').nullable().alter(); is not particularly flexible, because it attempts to switch type from itself to itself, which works by a happy accident in majority databases, but breaks for the others (such as CockroachDB). It was also quite different from how other schema operations worked.

@kibertoad kibertoad merged commit 8d75615 into master Aug 28, 2021
@kibertoad kibertoad deleted the feat/set-nullable branch August 28, 2021 17:41
OlivierCavadenti pushed a commit to AbeonaPascha/knex that referenced this pull request Nov 4, 2021
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.

How to change nullable constraint in column inside a migration?
1 participant