public function addRelation(TableRelation $relation, string $name = null)
    {
        $name = $name ?? $relation->name;
        $relation->name = $name;
        $this->relations[$name] = $relation;
        return $this;
    }