]> git.mjollnir.org Git - moodle.git/commitdiff
Now the Oracle XMLDB generator detects changes of precision
authorstronk7 <stronk7>
Tue, 4 Sep 2007 23:18:41 +0000 (23:18 +0000)
committerstronk7 <stronk7>
Tue, 4 Sep 2007 23:18:41 +0000 (23:18 +0000)
in NUMBERs without decimals (virtually INTs) and is able to perform the
change of precision properly

Merged from MOODLE_18_STABLE

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

index 40b00e51ce30e5b6a5c61356a2d997405d4af41c..460042239948a0251a718bfa953e74f22ed85281 100644 (file)
@@ -370,7 +370,7 @@ class XMLDBoci8po extends XMLDBgenerator {
     ///     - fill the new column with the values from the old one
     ///     - drop the old column
     ///     - rename the temp column to the original name
-        if (($typechanged) || ($oldmetatype == 'N' && ($precisionchanged || $decimalchanged))) {
+        if (($typechanged) || (($oldmetatype == 'N' || $oldmetatype == 'I')  && ($precisionchanged || $decimalchanged))) {
             $tempcolname = $xmldb_field->getName() . '_alter_column_tmp';
         /// Prevent temp field to have both NULL/NOT NULL and DEFAULT constraints
             $this->alter_column_skip_notnull = true;