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

Inconsistent naming for nullable columns in migration files #132

Closed
SferaDev opened this issue Sep 25, 2023 · 4 comments
Closed

Inconsistent naming for nullable columns in migration files #132

SferaDev opened this issue Sep 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@SferaDev
Copy link
Member

SferaDev commented Sep 25, 2023

For alter_column we need to set not_null: true but for add_column we need to set nullable: false. It would be nice to be consistent with the names in the different operations.

@exekias exekias added the bug Something isn't working label Oct 4, 2023
@pucke-dev
Copy link
Contributor

May I help with this? @exekias

@exekias
Copy link
Member

exekias commented Oct 6, 2023

That would be awesome! let us know if we can help in any way!

Also pinging @andrew-farries just in case he has any thoughts, we never got to discuss this issue

@pucke-dev
Copy link
Contributor

pucke-dev commented Oct 6, 2023

I think the only thing left to do, is to decide for either nullable or not_null.
From my experience, I saw nullable more often in a json/javascript context than not_null - but I am fine with both. Do you have any thoughts on this? @exekias @andrew-farries

@exekias
Copy link
Member

exekias commented Oct 7, 2023

I agree, nullable works for me

andrew-farries pushed a commit that referenced this issue Oct 11, 2023
…181)

Realated Issue: #132

This PR includes **BREAKING CHANGES**, existing migrations that add a
not null constraint using the `not_null` property will not work anymore.
The migration strategy would be to rename those `not_null` fields in
`alter_column` operations to `nullable`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants