Make WordPress Core

Ticket #20634: upgrade_1589.patch

File upgrade_1589.patch, 1.3 KB (added by SidHarrell, 13 years ago)
  • upgrade.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: /home/sidney/NetBeansProjects/trunk_project/EE_trunk/wp-admin/includes
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    15861586                                // Get the field type from the query
    15871587                                preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches);
    15881588                                $fieldtype = $matches[1];
    1589 
     1589                                $bools = array('boolean', 'bool', 'BOOLEAN', 'BOOL');
     1590                                if (in_array($fieldtype, $bools)) {
     1591                                        $fieldtype = 'tinyint(1)';
     1592                                }
    15901593                                // Is actual field type different from the field type in query?
    1591                                 if ($tablefield->Type != $fieldtype) {
     1594                                if (strcasecmp($tablefield->Type, $fieldtype) !=0) {
    15921595                                        // Add a query to change the column type
    15931596                                        $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)];
    15941597                                        $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}";