]> git.mjollnir.org Git - moodle.git/commitdiff
prevent nulls to become nulls (oracle error)
authorstronk7 <stronk7>
Thu, 28 Sep 2006 23:06:04 +0000 (23:06 +0000)
committerstronk7 <stronk7>
Thu, 28 Sep 2006 23:06:04 +0000 (23:06 +0000)
and defaults null to become defaults null
when temporary columns are used

lib/xmldb/classes/generators/oci8po/oci8po.class.php

index 0c33fd3383785b613996091eb5bf00bf768889a4..5571f9b69b2167067b8e435df257df4c62786d63 100644 (file)
@@ -303,6 +303,14 @@ class XMLDBoci8po extends XMLDBgenerator {
             $this->alter_column_skip_default = false;
         /// Dissable the type section because we have done it with the temp field
             $this->alter_column_skip_type = true;
+        /// If new field is nullable, nullability hasn't changed
+            if (!$xmldb_field->getNotnull()) {
+                $notnullchanged = false;
+            }
+        /// If new field hasn't default, default hasn't changed
+            if ($xmldb_field->getDefault() === null) {
+                $defaultchanged = false;
+            }
         }
 
     /// If type and precision and decimals hasn't changed, prevent the type clause