update insert into ts_relations distinct