aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-12-23 16:04:15 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-12-23 16:53:06 +0400
commitdad4215c4c3593b8753e41777a9993ace39d4d95 (patch)
tree3424a2aa4f45967d576b2fda46e94117c2a088bd
parent517703eb21d24fc0e3ed632220075d961ba10d6f (diff)
downloadsonarqube-dad4215c4c3593b8753e41777a9993ace39d4d95.tar.gz
sonarqube-dad4215c4c3593b8753e41777a9993ace39d4d95.zip
SONAR-3118 Remove property "sonar.useStructureDump"
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java7
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl8
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb11
4 files changed, 5 insertions, 23 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
index 22e2ccd4b8f..c876dd10c87 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/CorePlugin.java
@@ -183,13 +183,6 @@ import java.util.List;
// SERVER-SIDE TECHNICAL PROPERTIES
@Property(
- key = "sonar.useStructureDump",
- name = "Use Structure Dump",
- description = "Used when creating database schema",
- project = false,
- global = false,
- defaultValue = "true"),
- @Property(
key = "sonar.authenticator.downcase",
name = "Downcase login",
description = "Downcase login during user authentication, typically for Active Directory",
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
index 2be852b3d1c..11579c6ed00 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-derby.sql
@@ -1,5 +1,3 @@
--- Version 2.11
-
-- All the rows inserted during Rails migrations. Rows inserted during server startup tasks (Java) are excluded : rules, profiles, metrics, ...
INSERT INTO ACTIVE_FILTERS(ID, FILTER_ID, USER_ID, ORDER_INDEX) VALUES (1, 1, null, 1);
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
index b01f46b5494..ba7b5741bf2 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-derby.ddl
@@ -1,9 +1,7 @@
--- Structure of version 2.11
+-- Structure of Sonar Database
--- This file has been generated manually :
--- 1. start sonar with property sonar.useStructureDump=false
--- 2. execute $DERBY_HOME/bin/dblook -d 'jdbc:derby://localhost:1527/sonar;user=sonar;password=sonar' -o /derby.ddl
--- 3. copy the generated derby.ddl into this file
+-- Initially this file has been generated from existing Derby DB
+-- Should be updated manually, during addition of new migrations
CREATE TABLE "QUALITY_MODELS" (
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
diff --git a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb
index 5bf7e0761b6..6a18e258b9c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/lib/database_version.rb
@@ -71,7 +71,7 @@ class DatabaseVersion
def self.automatic_setup
if current_version<=0
- try_restore_structure_dump() if use_structure_dump?
+ try_restore_structure_dump()
upgrade_and_start()
end
if uptodate?
@@ -104,17 +104,10 @@ class DatabaseVersion
::Java::OrgSonarServerUi::JRubyFacade.getInstance().getDatabase().getDialect().getActiveRecordDialectCode()
end
- def self.use_structure_dump?
- # Important : default value is not loaded at this time by org.sonar.api.config.PropertyDefinitions.
- # That's why the Settings component does not return the default value (true) when
- # the property is not set.
- ::Java::OrgSonarServerUi::JRubyFacade.getInstance().getSettings().getString('sonar.useStructureDump')!='false'
- end
-
def self.production?
@@production ||=
begin
dialect()!='derby'
end
end
-end \ No newline at end of file
+end