Changed database connection driver to DB::factory