We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Using Migrations, when you define NULL fields, they are not created as NULLable in MariaDB database.
Table definition with 3 fields set up as NULLable
Look at the result table in database, where the 3 fields do not accept NULL
Looking at Database\Forge.php I noticed there is a differente between a protected property $_null in MySQLi\Forge and $null in Database\Forge
Here it is possible to see when the decision depends on the $null property wich is empty
Unfortunately in MySQLi\Forge the property is defined as $_null so it is ignored by Database\Forge
Suggested Solution
As far as I could work on it, it is a simply change $_null to $null in MySQLi\Forge line 92 solves the problem
After the change NULLable filds passed to work as expected.
It still need some additional tests to understand why $_null was written like that, as well as search for any colateral behavior.
CodeIgniter 4 version Master Branch
Affected module(s) vendor\codeigniter4\framework\system\Database\MySQLi\Forge.php
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Using Migrations, when you define NULL fields, they are not created as NULLable in MariaDB database.
Table definition with 3 fields set up as NULLable
Look at the result table in database, where the 3 fields do not accept NULL
Looking at Database\Forge.php I noticed there is a differente between a protected property $_null in MySQLi\Forge and $null in Database\Forge
Here it is possible to see when the decision depends on the $null property wich is empty
Unfortunately in MySQLi\Forge the property is defined as $_null so it is ignored by Database\Forge
Suggested Solution
As far as I could work on it, it is a simply change $_null to $null in MySQLi\Forge line 92 solves the problem
After the change NULLable filds passed to work as expected.
It still need some additional tests to understand why $_null was written like that, as well as search for any colateral behavior.
CodeIgniter 4 version
Master Branch
Affected module(s)
vendor\codeigniter4\framework\system\Database\MySQLi\Forge.php
The text was updated successfully, but these errors were encountered: