Every now and then, we are running the admin/cli/check_database_schema.php script in our Moodle installation.
This time, this issue was highlighted:
-------------------------------------------------------------------------------
block_sharing_cart_sections
* column 'name' should be NOT NULL (C)
-------------------------------------------------------------------------------
I have fixed this database table now locally with SQL, but as I expect that it affects more installations than ours, I would like to encourage you to have a look if you should fix this with a new entry in db/upgrade.php.
Thank you, Alex, for the detailed description of the problem. I have assigned Ulrik, who may pass this to another staff who may be aware of this issue.
Every now and then, we are running the admin/cli/check_database_schema.php script in our Moodle installation.
This time, this issue was highlighted:
Upon investigation, I saw that for upgraded installations, the table was introduced correctly in https://github.com/donhinkelman/moodle-block_sharing_cart/blob/master/db/upgrade.php#L115, but changed later in https://github.com/donhinkelman/moodle-block_sharing_cart/blob/master/db/upgrade.php#L131.
I am not sure / haven't looked deeper at the code, but as the NOTNULL parameter was not set in https://github.com/donhinkelman/moodle-block_sharing_cart/blob/master/db/upgrade.php#L131, this table layout flaw could have sneaked in into upgraded installations.
I have fixed this database table now locally with SQL, but as I expect that it affects more installations than ours, I would like to encourage you to have a look if you should fix this with a new entry in db/upgrade.php.
Thanks in advance, Ale