protected function validateDatabase()
    {
        $databaseConfig = DB::getConfig();
        // Gracefully fail if no DB is configured
        if (empty($databaseConfig['database'])) {
            $this->detectLegacyEnvironment();
            $this->redirectToInstaller();
        }
    }