]> git.mjollnir.org Git - moodle.git/commitdiff
Testing comments and default clauses containing chars to be escaped.
authorstronk7 <stronk7>
Thu, 15 Mar 2007 19:16:27 +0000 (19:16 +0000)
committerstronk7 <stronk7>
Thu, 15 Mar 2007 19:16:27 +0000 (19:16 +0000)
Merged from MOODLE_18_STABLE

admin/xmldb/actions/test/test.class.php

index 02321fead98ba114d17d1c4d01591fe7e460cc34..6369e15de8cdc057c7013577ebd55d435dca8970 100644 (file)
@@ -114,6 +114,8 @@ class test extends XMLDBAction {
         $table->addIndexInfo('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
         $table->addIndexInfo('rsstype', XMLDB_INDEX_UNIQUE, array('rsstype'));
 
+        $table->setComment("This is a test'n drop table. You can drop it safely");
+
     /// Get SQL code and execute it
         $test = new stdClass;
         $test->sql = $table->getCreateTableSQL($CFG->dbtype, $CFG->prefix, true);
@@ -275,7 +277,7 @@ class test extends XMLDBAction {
         /// Get SQL code and execute it
             $test = new stdClass;
             $field = new XMLDBField('grade');
-            $field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, 'test');
+            $field->setAttributes(XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null, null, "test'n drop");
 
             $test->sql = $table->getAlterFieldSQL($CFG->dbtype, $CFG->prefix, $field, true);
             $test->status = change_field_type($table, $field, false, false);