diff --git src/wp-admin/includes/upgrade.php src/wp-admin/includes/upgrade.php
index f383b3d..c158a7d 100644
|
|
function dbDelta( $queries = '', $execute = true ) { |
2163 | 2163 | |
2164 | 2164 | // Create a tablename index for an array ($cqueries) of queries |
2165 | 2165 | foreach ($queries as $qry) { |
2166 | | if ( preg_match( "|CREATE TABLE ([^ ]*)|", $qry, $matches ) ) { |
| 2166 | if ( preg_match( "|CREATE TABLE IF NOT EXISTS ([^ ]*)|", $qry, $matches ) ) { |
2167 | 2167 | $cqueries[ trim( $matches[1], '`' ) ] = $qry; |
2168 | | $for_update[$matches[1]] = 'Created table '.$matches[1]; |
| 2168 | $for_update[ $matches[1] ] = 'Created table ' . $matches[1]; |
| 2169 | } elseif ( preg_match( "|CREATE TABLE ([^ ]*)|", $qry, $matches ) ) { |
| 2170 | $cqueries[ trim( $matches[1], '`' ) ] = $qry; |
| 2171 | $for_update[ $matches[1] ] = 'Created table ' . $matches[1]; |
| 2172 | } elseif ( preg_match( "|CREATE DATABASE IF NOT EXISTS ([^ ]*)|", $qry, $matches ) ) { |
| 2173 | array_unshift( $cqueries, $qry ); |
2169 | 2174 | } elseif ( preg_match( "|CREATE DATABASE ([^ ]*)|", $qry, $matches ) ) { |
2170 | 2175 | array_unshift( $cqueries, $qry ); |
2171 | 2176 | } elseif ( preg_match( "|INSERT INTO ([^ ]*)|", $qry, $matches ) ) { |