public function haveBlogInDatabase($domainOrPath, array $overrides = [], $subdomain = true)
    {
        $base = Blog::makeDefaults($subdomain);
        if ($subdomain) {
            $base['domain'] = false !== strpos($domainOrPath, $this->getSiteDomain())
                ? $domainOrPath
                : trim($domainOrPath, '/') . '.' . $this->getSiteDomain();
            $base['path'] = '/';
        } else {
            $base['domain'] = $this->getSiteDomain();
            $base['path'] = '/' . trim($domainOrPath, '/') . '/';
        }

        $data = array_merge($base, array_intersect_key($overrides, $base));

        // Make sure the path is in the `/path/` format.
        if (isset($data['path']) && $data['path'] !== '/') {
            $data['path'] = '/' . Utils::unleadslashit(Utils::untrailslashit($data['path'])) . '/';
        }

        $blogId = $this->haveInDatabase($this->grabBlogsTableName(), $data);
        $this->scaffoldBlogTables($blogId, $domainOrPath, (bool)$subdomain);

        if (($fs = $this->getWpFilesystemModule(false)) instanceof WPFilesystem) {
            $this->debug('Scaffolding blog uploads directories.');
            $fs->makeUploadsDir("sites/{$blogId}");
        }

        return $blogId;
    }