Skip to content

Commit 408c83b

Browse files
committed
Revert "Prevent multiple "check" queries"
1 parent 09dac4b commit 408c83b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Schema/Builder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ public function register_custom_tables_names() {
263263
* @return array<mixed> A list of each creation or update result.
264264
*/
265265
public function up( $force = false ) {
266-
if ( ! is_blog_installed() || wp_installing() ) {
266+
try {
267+
$this->db::table( 'posts' )->select ( 1 )->limit( 1 )->get();
268+
} catch ( \Exception $e ) {
269+
// Let's not try to create the tables on a blog that's missing the basic ones.
267270
return [];
268271
}
269272

0 commit comments

Comments
 (0)