diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index 802269e047..a1dd97ce23 100644
a
|
b
|
function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.N |
2736 | 2736 | |
2737 | 2737 | // Create a tablename index for an array ($cqueries) of queries. |
2738 | 2738 | foreach ( $queries as $qry ) { |
2739 | | if ( preg_match( '|CREATE TABLE ([^ ]*)|', $qry, $matches ) ) { |
| 2739 | if ( preg_match( '/CREATE TABLE IF NOT EXISTS ([^ ]*)|CREATE TABLE ([^ ]*)/', $qry, $matches ) ) { |
2740 | 2740 | $cqueries[ trim( $matches[1], '`' ) ] = $qry; |
2741 | 2741 | $for_update[ $matches[1] ] = 'Created table ' . $matches[1]; |
2742 | | } elseif ( preg_match( '|CREATE DATABASE ([^ ]*)|', $qry, $matches ) ) { |
| 2742 | } elseif ( preg_match( '/CREATE DATABASE IF NOT EXISTS ([^ ]*)|CREATE DATABASE ([^ ]*)/', $qry, $matches ) ) { |
2743 | 2743 | array_unshift( $cqueries, $qry ); |
2744 | | } elseif ( preg_match( '|INSERT INTO ([^ ]*)|', $qry, $matches ) ) { |
| 2744 | } elseif ( preg_match( '/INSERT INTO ([^ ]*)/', $qry, $matches ) ) { |
2745 | 2745 | $iqueries[] = $qry; |
2746 | | } elseif ( preg_match( '|UPDATE ([^ ]*)|', $qry, $matches ) ) { |
| 2746 | } elseif ( preg_match( '/UPDATE ([^ ]*)/', $qry, $matches ) ) { |
2747 | 2747 | $iqueries[] = $qry; |
2748 | 2748 | } else { |
2749 | 2749 | // Unrecognized query type. |