MySQL - Do not allow two rows to have the same specific columns
CREATE TABLE `t1` (
  `id` int(11) ,
  `source` varchar(30) ,
  `target` varchar(30) ,
  `desc` varchar(100) ,
  PRIMARY KEY `pk_id` (`id`),
  UNIQUE KEY `uc_source_target` (`source`,`target`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci


or on existing table

 ALTER TABLE t1 ADD CONSTRAINT uc_source_target UNIQUE (`source`,`target`);


INSERT INTO t1
    (`id`, `source`, `target`, `desc`)
VALUES
    (0, 'hello', 'hola', 'this is a description'),
    (1, 'hello', 'no', 'this is a description'),
    (2, 'what', 'what', 'desc');




 mysql&gt;  INSERT INTO t1
    -&gt;            (`id`,`source`,`target`,`desc`)
    -&gt;     VALUES
    -&gt;             (3,'hello','hola','testing');
ERROR 1062 (23000): Duplicate entry 'hello-hola' for key 'uc_source_target'