aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-03-15 11:00:57 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-03-15 11:00:57 +0100
commitf16ec1f6717175089639d8c4348369bcb8c04b5e (patch)
tree8dc8add2560e8a9c04133a52ea87d9354f640849 /sonar-server
parent0da9800cf24987bb9118af3b553c3fd34d735d82 (diff)
downloadsonarqube-f16ec1f6717175089639d8c4348369bcb8c04b5e.tar.gz
sonarqube-f16ec1f6717175089639d8c4348369bcb8c04b5e.zip
Do not use deprecated rule categories (column MEASURES.RULES_CATEGORY_ID, table RULES_CATEGORY_ID), but keep them in API for backward-compatibility
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb2
-rw-r--r--sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java4
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml2
-rw-r--r--sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml2
6 files changed, 4 insertions, 10 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
index 09ea92f6d6c..f13ed7a1af0 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/timemachine_controller.rb
@@ -73,7 +73,7 @@ class Api::TimemachineController < Api::ApiController
@measures_by_sid={}
unless @metrics.empty?
- sql_conditions = ['snapshots.project_id=:rid AND snapshots.status=:status AND project_measures.rules_category_id IS NULL AND project_measures.rule_id IS NULL AND project_measures.rule_priority IS NULL AND project_measures.person_id IS NULL']
+ sql_conditions = ['snapshots.project_id=:rid AND snapshots.status=:status AND project_measures.rule_id IS NULL AND project_measures.rule_priority IS NULL AND project_measures.person_id IS NULL']
sql_values = {:rid => @resource.id, :status => Snapshot::STATUS_PROCESSED}
if params[:fromDateTime]
diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
index c199fecb76f..d57ae80c12b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
@@ -72,7 +72,7 @@ class InitialSchema < ActiveRecord::Migration
t.column :rule_id, :integer
t.column :rules_category_id, :integer
t.column :text_value, :string, :limit => 96, :null => true
- t.column 'tendency', :integer, :null => true
+ t.column :tendency, :integer, :null => true
t.column :measure_date, :datetime, :null => true
t.column :project_id, :integer, :null => true
t.column :alert_status, :string, :limit => 5, :null => true
diff --git a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java
index d7c72f8ad31..8533b26b7b3 100644
--- a/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/configuration/ProfilesBackupTest.java
@@ -106,8 +106,8 @@ public class ProfilesBackupTest extends AbstractDbUnitTestCase {
RulesProfile profileNotProvided = new RulesProfile("test not provided", "lang", false, false);
getSession().save(profileProvided, profileNotProvided);
- Rule rule1 = new Rule("testPlugin", "testKey", "testName", null, null);
- Rule rule2 = new Rule("testPlugin", "testKey2", "testName2", null, null);
+ Rule rule1 = new Rule("testPlugin", "testKey");
+ Rule rule2 = new Rule("testPlugin", "testKey2");
getSession().save(rule1, rule2);
RuleParam ruleParam1 = new RuleParam(rule1, "paramKey", "test", "int");
getSession().save(ruleParam1);
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
index a94cecdc87b..c2218110bbb 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/disableDeprecatedActiveRuleParameters.xml
@@ -1,7 +1,5 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="Efficiency"/>
-
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]" />
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
index 93f5b83f9c9..a21b0eddd82 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updadeRuleFields.xml
@@ -1,7 +1,5 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="Efficiency"/>
-
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]"/>
diff --git a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
index aa408462846..5afc29ed294 100644
--- a/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
+++ b/sonar-server/src/test/resources/org/sonar/server/startup/RegisterRulesTest/updateRuleParameters.xml
@@ -1,7 +1,5 @@
<dataset>
- <rules_categories id="1" name="Efficiency" description="Efficiency"/>
-
<rules id="1" plugin_rule_key="rule1" plugin_name="fake" plugin_config_key="old_config_key" name="old name" description="old description"
enabled="true" priority="2" cardinality="SINGLE" parent_id="[null]"/>