浏览代码

fix bug:批量上传关系会产生重复关系数据

lijie 3 年之前
父节点
当前提交
f86eade2a0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dmp-business/dmp-rwd/src/main/resources/db/init/schema.sql

+ 1 - 1
dmp-business/dmp-rwd/src/main/resources/db/init/schema.sql

@@ -164,7 +164,7 @@ CREATE TABLE IF NOT EXISTS `dt_relation` (
   `ts` timestamp default current_timestamp on update current_timestamp NOT NULL COMMENT '乐观锁',
   PRIMARY KEY (`id`) USING BTREE,
   KEY `idx_graph_code` (`graph_code`) USING BTREE,
-  UNIQUE KEY `idx_1`(`graph_code`,`rel_code`,`obj_from`,`obj_to`,`rel_value`,`project_id`) USING BTREE,
+  UNIQUE KEY `idx_1`(`graph_code`,`rel_code`,`obj_from`,`obj_to`,`project_id`) USING BTREE,
   KEY `idx_2` (`graph_id`,`rel_code`,`obj_from`,`obj_to`,`project_id`) USING BTREE,
   KEY `idx_3` (`graph_code`,`rel_code`,`obj_to`,`project_id`) USING BTREE,
   KEY `idx_4` (`graph_id`,`rel_code`,`obj_to`,`project_id`) USING BTREE,