# 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.
|
|
|
1586 | 1586 | // Get the field type from the query |
1587 | 1587 | preg_match("|".$tablefield->Field." ([^ ]*( unsigned)?)|i", $cfields[strtolower($tablefield->Field)], $matches); |
1588 | 1588 | $fieldtype = $matches[1]; |
1589 | | |
| 1589 | $bools = array('boolean', 'bool', 'BOOLEAN', 'BOOL'); |
| 1590 | if (in_array($fieldtype, $bools)) { |
| 1591 | $fieldtype = 'tinyint(1)'; |
| 1592 | } |
1590 | 1593 | // Is actual field type different from the field type in query? |
1591 | | if ($tablefield->Type != $fieldtype) { |
| 1594 | if (strcasecmp($tablefield->Type, $fieldtype) !=0) { |
1592 | 1595 | // Add a query to change the column type |
1593 | 1596 | $cqueries[] = "ALTER TABLE {$table} CHANGE COLUMN {$tablefield->Field} " . $cfields[strtolower($tablefield->Field)]; |
1594 | 1597 | $for_update[$table.'.'.$tablefield->Field] = "Changed type of {$table}.{$tablefield->Field} from {$tablefield->Type} to {$fieldtype}"; |