From 78e02ce7adc2836c27b08e5ac4df919e420b156e Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Mon, 29 Apr 2019 13:36:16 +0200 Subject: Fix problem in upgrade step --- db/upgrade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db/upgrade.php') diff --git a/db/upgrade.php b/db/upgrade.php index 87ee235..d6d3d02 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -109,17 +109,17 @@ function xmldb_qtype_algebra_upgrade($oldversion=0) { upgrade_plugin_savepoint(true, 2019042706, 'qtype', 'algebra'); } - if ($oldversion < 2019042707) { + if ($oldversion < 2019042900) { - // Define key questionid (foreign-unique) to be added to qtype_algebra_variables. + // Define key questionid (foreign) to be added to qtype_algebra_variables. $table = new xmldb_table('qtype_algebra_variables'); - $key = new xmldb_key('questionid', XMLDB_KEY_FOREIGN_UNIQUE, array('questionid'), 'question', array('id')); + $key = new xmldb_key('questionid', XMLDB_KEY_FOREIGN, array('questionid'), 'question', array('id')); // Launch add key questionid. $dbman->add_key($table, $key); // Record that qtype_algebra savepoint was reached. - upgrade_plugin_savepoint(true, 2019042707, 'qtype', 'algebra'); + upgrade_plugin_savepoint(true, 2019042900, 'qtype', 'algebra'); } return true; -- cgit v1.2.3