Skip to content

allowNull corresponds to default value null #33

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
SOHELAHMED7 opened this issue Aug 28, 2024 · 0 comments · Fixed by #34
Closed

allowNull corresponds to default value null #33

SOHELAHMED7 opened this issue Aug 28, 2024 · 0 comments · Fixed by #34
Assignees

Comments

@SOHELAHMED7
Copy link
Member

Resolve below TODO:

File: src/lib/items/Attribute.php::toColumnSchema():

image

Conclusion:

It is fine to set defaultValue to null if allowNull is true.

If I create a table with multiple columns. And if a column (say "c2") has allowNull is true then when I try to insert (by raw SQL statement) a row without specifying column "c2" then its value will be automatically inserted as null.


Part of #10

and

Part of cebe#180

@SOHELAHMED7 SOHELAHMED7 self-assigned this Aug 28, 2024
SOHELAHMED7 added a commit that referenced this issue Aug 28, 2024
@SOHELAHMED7 SOHELAHMED7 linked a pull request Aug 28, 2024 that will close this issue
@cebe cebe closed this as completed in #34 Nov 12, 2024
cebe added a commit that referenced this issue Nov 12, 2024
…efault-value-null

Resolve: allowNull corresponds to default value null #33
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant