diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-11-07 11:26:04 +0100 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-11-07 11:44:39 +0100 |
commit | cc91a6f618c2348bd4751d78ad44be0e8f4138a8 (patch) | |
tree | b302fd5de79819b3a953d6ce027e244b796ae6b1 /sonar-core | |
parent | e13422f24d2255f1860d8113eae5ba03ba8bbac1 (diff) | |
download | sonarqube-cc91a6f618c2348bd4751d78ad44be0e8f4138a8.tar.gz sonarqube-cc91a6f618c2348bd4751d78ad44be0e8f4138a8.zip |
SONAR-5814 Simplify migration based on MassUpdate
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/Migration50Mapper.java | 16 | ||||
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/SnapshotSource.java | 57 |
2 files changed, 0 insertions, 73 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/Migration50Mapper.java b/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/Migration50Mapper.java index c06489a7f3c..de2c16a78d2 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/Migration50Mapper.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/Migration50Mapper.java @@ -122,20 +122,4 @@ public interface Migration50Mapper { " WHERE id=#{id}") @Options(useGeneratedKeys = false) void updateComponentUuids(Component component); - - @Select("SELECT " + - " ss.id as \"id\", " + - " ss.updated_at as \"updatedAt\", " + - " s.build_date as \"snapshotBuildDate\" " + - "FROM snapshot_sources ss " + - " INNER JOIN snapshots s ON s.id = ss.snapshot_id " + - " WHERE ss.updated_at IS NULL") - @Result(javaType = SnapshotSource.class) - List<SnapshotSource> selectSnapshotSources(); - - @Update("UPDATE snapshot_sources " + - " SET updated_at=#{updatedAt} " + - " WHERE id=#{id}") - @Options(useGeneratedKeys = false) - void updateSnapshotSource(SnapshotSource snapshotSource); } diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/SnapshotSource.java b/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/SnapshotSource.java deleted file mode 100644 index 4132cacb4b5..00000000000 --- a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v50/SnapshotSource.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.core.persistence.migration.v50; - -import javax.annotation.CheckForNull; - -import java.util.Date; - -public class SnapshotSource { - - private Long id; - private Date updatedAt; - private Date snapshotBuildDate; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @CheckForNull - public Date getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(Date updatedAt) { - this.updatedAt = updatedAt; - } - - public Date getSnapshotBuildDate() { - return snapshotBuildDate; - } - - public void setSnapshotBuildDate(Date snapshotBuildDate) { - this.snapshotBuildDate = snapshotBuildDate; - } - -} |