aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2012-02-13 16:04:24 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2012-02-13 16:04:24 +0100
commit1b714ecf1d3bb0930b3724d177d3d0de18d0ef3c (patch)
treede3f265d5724a6d1f017e9f828c26412b43583eb /sonar-server
parent5020106e7712cb85bad4449186bb842c19733727 (diff)
downloadsonarqube-1b714ecf1d3bb0930b3724d177d3d0de18d0ef3c.tar.gz
sonarqube-1b714ecf1d3bb0930b3724d177d3d0de18d0ef3c.zip
SONAR-3248 purge REVIEW_COMMENTS and ACTION_PLANS
This commit includes the new index on REVIEWS.RESOURCE_ID and the renaming of ACTION_PLANS.DEAD_LINE to DEADLINE
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/258_add_index_on_review_resource_id.rb34
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb30
3 files changed, 65 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb
index 5e28dc013ce..c9178bc5026 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/191_create_review.rb
@@ -34,7 +34,7 @@ class CreateReview < ActiveRecord::Migration
t.column 'status', :string, :null => true, :limit => 10
t.column 'severity', :string, :null => true, :limit => 10
t.column 'rule_failure_permanent_id', :integer, :null => true
- t.column 'project_id', :integer, :null => true
+ t.column 'project_id', :integer, :null => true
t.column 'resource_id', :integer, :null => true
t.column 'resource_line', :integer, :null => true
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/258_add_index_on_review_resource_id.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/258_add_index_on_review_resource_id.rb
new file mode 100644
index 00000000000..40810ba2a7f
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/258_add_index_on_review_resource_id.rb
@@ -0,0 +1,34 @@
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2012 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar 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.
+#
+# Sonar 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 Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+
+#
+# Sonar 2.14
+#
+class AddIndexOnReviewResourceId < ActiveRecord::Migration
+
+ def self.up
+ begin
+ add_index('reviews', 'resource_id', :name => 'reviews_rid')
+ rescue
+ # already exists
+ end
+ end
+
+end
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb
new file mode 100644
index 00000000000..9ea0116032b
--- /dev/null
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb
@@ -0,0 +1,30 @@
+#
+# Sonar, entreprise quality control tool.
+# Copyright (C) 2008-2012 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# Sonar 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.
+#
+# Sonar 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 Sonar; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
+#
+
+#
+# Sonar 2.14
+#
+class RenameActionPlansColumns < ActiveRecord::Migration
+
+ def self.up
+ rename_column(:action_plans, :dead_line, :deadline)
+ end
+
+end