-
Notifications
You must be signed in to change notification settings - Fork 175
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
Upgrading to 2020080400 creates a field with wrong default value #359
Comments
yes. you're right. I don't see this breaking anything, but it should be fixed. We would love a pull request for with a fix. |
It can break some CI systems. Caused me some issues this morning. I can fix this. PR incoming |
Peterburnett
added a commit
to Peterburnett/h5p-moodle-plugin
that referenced
this issue
Aug 20, 2020
Peterburnett
added a commit
to catalyst/moodle-mod_hvp
that referenced
this issue
Sep 2, 2020
This was referenced Aug 3, 2021
Peterburnett
pushed a commit
to catalyst/moodle-mod_hvp
that referenced
this issue
Oct 6, 2021
If you had upgraded to mod_hvp version 2020080400 the mdl_hvp.completionpass definition incorrectly allowed NULLs. (If you installed 2020080400 then mdl_hvp.completionpass did not allow NULLs). The fix for h5p#359 corrected this column definition but didn't change any NULL values in the data resulting in error "column does not allow NULLs" when trying to upgrade beyond 2020080400. This commit changes any NULLs in this column to 0 prior to the change of the column definition to "not NULL".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install.xml:
<FIELD NAME="completionpass" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
upgrade.php
new xmldb_field('completionpass', XMLDB_TYPE_INTEGER, '1', null, null, null, 0, 'timemodified')
=> php admin/cli/check_database_schema.php
The text was updated successfully, but these errors were encountered: