aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-08-31 19:27:13 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-09-01 00:46:32 +0400
commit7cf051c0f7d8ec017381b05c85044e9321c6c4f7 (patch)
tree8c06051077ea988f479ec0d2a30ac459baf56c1d /sonar-testing-harness/src
parent8e085c96accc9c912747df5c8b93c8a0bc85ad95 (diff)
downloadsonarqube-7cf051c0f7d8ec017381b05c85044e9321c6c4f7.tar.gz
sonarqube-7cf051c0f7d8ec017381b05c85044e9321c6c4f7.zip
SONAR-1091 Add CPD over different projects
* Add table clone_blocks * Add DbCloneIndex, which can be activated in sonar-cpd-plugin using property "sonar.cpd.cross_project=true"
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl11
1 files changed, 11 insertions, 0 deletions
diff --git a/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl b/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
index 864fff1f2a2..1c8c3eb23fe 100644
--- a/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
+++ b/sonar-testing-harness/src/main/resources/org/sonar/test/persistence/sonar-test.ddl
@@ -487,3 +487,14 @@ CREATE TABLE REVIEW_COMMENTS (
REVIEW_TEXT CLOB(2147483647),
primary key (id)
);
+
+CREATE TABLE CLONE_BLOCKS (
+ SNAPSHOT_ID INTEGER,
+ HASH VARCHAR(50),
+ RESOURCE_KEY VARCHAR(400),
+ INDEX_IN_FILE INTEGER NOT NULL,
+ START_LINE INTEGER NOT NULL,
+ END_LINE INTEGER NOT NULL
+);
+CREATE INDEX CLONE_BLOCKS_HASH ON CLONE_BLOCKS (HASH);
+CREATE INDEX CLONE_BLOCKS_RESOURCE ON CLONE_BLOCKS (SNAPSHOT_ID, RESOURCE_KEY);