MDL-24322 temporary working for broken prev/next handling in xmldb
authorPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 10:18:30 +0000 (10:18 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 21 Sep 2010 10:18:30 +0000 (10:18 +0000)
lib/ddl/simpletest/testddl.php

index ef84e81..052ca3f 100755 (executable)
@@ -281,7 +281,9 @@ class ddl_test extends UnitTestCase {
         $table->add_field('rid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
         $table->add_field('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
-        $table->add_key('primary', XMLDB_KEY_PRIMARY, array('rid'));
+        // this is a sloppy workaround for borked prev/next processing in xmldb table
+        $key = new xmldb_key('primary', XMLDB_KEY_PRIMARY, array('rid'));
+        $table->addKey($key, 'id');
         $table->setComment("This is a test'n drop table. You can drop it safely");
 
         $this->tables[$table->getName()] = $table;