self::TARGET_VERSION ) { return false; } if ( self::TARGET_VERSION === $current ) { return true; } $migrations = array( new CreateSharedTables(), new EnhancePhase7DocumentTables(), new EnhancePhase10ExternalDocuments() ); foreach ( $migrations as $migration ) { if ( $migration->version() <= $current ) { continue; } if ( ! $migration->run() ) { return false; } update_option( self::OPTION_DB_VERSION, $migration->version(), false ); $current = $migration->version(); } return self::TARGET_VERSION === $current; } private function __construct() {} }