diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-22 11:07:15 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-22 11:18:03 +0200 |
commit | 620a129b9c8b5adb3de138084ab0b4ce49641ad9 (patch) | |
tree | 4e276a55375be4c6be3a96e9a9139a45577b0627 /server | |
parent | 46d6016e05e0c77de60ad3660a210f1aeaefa90d (diff) | |
download | sonarqube-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.rb | 6 |
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 |