From 5ff8c8c74e58a9df51be059908a064a43a67c50d Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Thu, 1 Sep 2011 19:06:46 +0400 Subject: SONAR-1091 CPD over different projects * Improve table clone_blocks and so DbCloneIndex. * Add purge of old clone blocks. --- .../src/main/resources/org/sonar/test/persistence/sonar-test.ddl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sonar-testing-harness') 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 1c8c3eb23fe..7ebfd7cdd4e 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 @@ -489,12 +489,13 @@ CREATE TABLE REVIEW_COMMENTS ( ); CREATE TABLE CLONE_BLOCKS ( + PROJECT_SNAPSHOT_ID INTEGER, 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_PROJECT_SNAPSHOT ON CLONE_BLOCKS (PROJECT_SNAPSHOT_ID); +CREATE INDEX CLONE_BLOCKS_SNAPSHOT ON CLONE_BLOCKS (SNAPSHOT_ID); CREATE INDEX CLONE_BLOCKS_HASH ON CLONE_BLOCKS (HASH); -CREATE INDEX CLONE_BLOCKS_RESOURCE ON CLONE_BLOCKS (SNAPSHOT_ID, RESOURCE_KEY); -- cgit v1.2.3