I would move this below the database setup step.  The observatory factory probably doesn't access the database in its constructor, but this will keep all the database configuration steps in one place.