aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-22 11:07:15 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-10-22 11:18:03 +0200
commit620a129b9c8b5adb3de138084ab0b4ce49641ad9 (patch)
tree4e276a55375be4c6be3a96e9a9139a45577b0627 /server
parent46d6016e05e0c77de60ad3660a210f1aeaefa90d (diff)
downloadsonarqube-620a129b9c8b5adb3de138084ab0b4ce49641ad9.tar.gz
sonarqube-620a129b9c8b5adb3de138084ab0b4ce49641ad9.zip
SONAR-5696 truncate table before adding column ANALYSIS_REPORTS.SNAPSHOT_ID
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/706_add_snapshot_id_to_analysis_reports.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/706_add_snapshot_id_to_analysis_reports.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/706_add_snapshot_id_to_analysis_reports.rb
index 4b571f83112..6de7a699f77 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/706_add_snapshot_id_to_analysis_reports.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/706_add_snapshot_id_to_analysis_reports.rb
@@ -23,7 +23,13 @@
# SONAR-5696
#
class AddSnapshotIdToAnalysisReports < ActiveRecord::Migration
+
+ class AnalysisReport < ActiveRecord::Base
+ set_table_name 'analysis_reports'
+ end
+
def self.up
+ AnalysisReport.delete_all
add_column 'analysis_reports', :snapshot_id, :integer, :null => false
end
end