Skip to content

Commit fba6dc4

Browse files
committed
Prevent multiple "check" queries
1 parent bc6ab9c commit fba6dc4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Schema/Builder.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,8 @@ public function register_custom_tables_names() {
256256
* @return array<mixed> A list of each creation or update result.
257257
*/
258258
public function up( $force = false ) {
259-
try {
260-
$this->db::table( 'posts' )->select ( 1 )->limit( 1 )->get();
261-
} catch ( \Exception $e ) {
262-
// Let's not try to create the tables on a blog that's missing the basic ones.
263-
return [];
259+
if ( ! is_blog_installed() || wp_installing() ) {
260+
return;
264261
}
265262

266263
$results = [];

0 commit comments

Comments
 (0)