mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-76584 question: correct temporary questionid upgrade field.
Pass correct parameter/type in field constructor (`XMLDB_NOTNULL`) for consistency. This corrects the definition and preserves the truthyness of the value that was incorrectly passed previously.
This commit is contained in:
parent
df502b3e4c
commit
89db417402
1 changed files with 2 additions and 2 deletions
|
@ -2219,7 +2219,7 @@ privatefiles,moodle|/user/files.php';
|
||||||
// Creating temporary field questionid to populate the data in question version table.
|
// Creating temporary field questionid to populate the data in question version table.
|
||||||
// This will make sure the appropriate question id is inserted the version table without making any complex joins.
|
// This will make sure the appropriate question id is inserted the version table without making any complex joins.
|
||||||
$table = new xmldb_table('question_bank_entries');
|
$table = new xmldb_table('question_bank_entries');
|
||||||
$field = new xmldb_field('questionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_TYPE_INTEGER);
|
$field = new xmldb_field('questionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL);
|
||||||
if (!$dbman->field_exists($table, $field)) {
|
if (!$dbman->field_exists($table, $field)) {
|
||||||
$dbman->add_field($table, $field);
|
$dbman->add_field($table, $field);
|
||||||
}
|
}
|
||||||
|
@ -2268,7 +2268,7 @@ privatefiles,moodle|/user/files.php';
|
||||||
|
|
||||||
// Dropping temporary field questionid.
|
// Dropping temporary field questionid.
|
||||||
$table = new xmldb_table('question_bank_entries');
|
$table = new xmldb_table('question_bank_entries');
|
||||||
$field = new xmldb_field('questionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_TYPE_INTEGER);
|
$field = new xmldb_field('questionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL);
|
||||||
if ($dbman->field_exists($table, $field)) {
|
if ($dbman->field_exists($table, $field)) {
|
||||||
$dbman->drop_field($table, $field);
|
$dbman->drop_field($table, $field);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue