diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:36:24 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-14 16:37:00 +0100 |
commit | 536562976dad7425fcb546736eaa6e463c8032a9 (patch) | |
tree | 28f2f72eeb12e6f2875b3ff16f08e396ca9481b5 /sonar-server | |
parent | 7cbe24d9765f4d212fd651bdbf864ac52d218938 (diff) | |
download | sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.tar.gz sonarqube-536562976dad7425fcb546736eaa6e463c8032a9.zip |
SONAR-3208 complete database tables
* add PROJECTS.PERSON_ID
* create the table AUTHORS
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_deadline.rb (renamed from sonar-server/src/main/webapp/WEB-INF/db/migrate/259_rename_action_plans_columns.rb) | 2 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb | 30 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb | 34 | ||||
-rw-r--r-- | sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml | 4 | ||||
-rw-r--r-- | sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml | 6 | ||||
-rw-r--r-- | sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml | 6 | ||||
-rw-r--r-- | sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml | 2 |
7 files changed, 74 insertions, 10 deletions
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_deadline.rb index 9ea0116032b..d9b9b5200fe 100644 --- 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_deadline.rb @@ -21,7 +21,7 @@ # # Sonar 2.14 # -class RenameActionPlansColumns < ActiveRecord::Migration +class RenameActionPlansDeadline < ActiveRecord::Migration def self.up rename_column(:action_plans, :dead_line, :deadline) diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb new file mode 100644 index 00000000000..a6512b007c7 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.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 AddProjectsPersonId < ActiveRecord::Migration + + def self.up + add_column 'projects', 'person_id', :integer, :null => true + end + +end diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.rb new file mode 100644 index 00000000000..f43c3b4a909 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/262_create_authors.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 CreateAuthors < ActiveRecord::Migration + + def self.up + create_table 'authors', :id => false do |t| + t.column 'person_id', :integer, :null => false + t.column 'committer', :string, :null => true, :limit => 100 + t.timestamps + end + end + +end diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml index bdc9bb389b9..daf3a4cf609 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/measures.xml @@ -15,11 +15,11 @@ <!-- Java classes --> <projects long_name="org.sonar.foo:File1" id="4" scope="FIL" kee="project:java:org.sonar.foo:File1" qualifier="CLA" name="File1" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.sonar.foo:File2" id="5" scope="FIL" kee="project:java:org.sonar.foo:File2" qualifier="CLA" name="File2" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="5" created_at="2008-12-25 01:00:01.00" build_date="2008-12-25 01:00:01.00" version="1.0" project_id="4" scope="FIL" qualifier="CLA" diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml index e794ed5298e..26eed6f6800 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/shared.xml @@ -1,15 +1,15 @@ <dataset> <projects long_name="java project" id="1" scope="PRJ" kee="project:java" qualifier="TRK" name="java project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="php project" id="2" scope="PRJ" kee="project:php" qualifier="TRK" name="php project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="php" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="php" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="org.sonar.foo" id="3" scope="DIR" kee="project:java:org.sonar.foo" qualifier="PAC" name="org.sonar.foo" root_id="1" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- Java project --> diff --git a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml index ae1441dd900..aac9b0863b0 100644 --- a/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml +++ b/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml @@ -2,16 +2,16 @@ <!-- java project --> <projects long_name="java project" id="1" scope="PRJ" kee="project:java" qualifier="TRK" name="java project" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- views --> <projects long_name="Root view" id="2" scope="PRJ" kee="ROOT_VIEW" qualifier="VW" name="Root view" root_id="[null]" - description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"/> <projects long_name="Sub view" id="3" scope="PRJ" kee="SUB_VIEW" qualifier="SVW" name="Sub view" root_id="2" - description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]"/> + description="[null]" enabled="true" profile_id="[null]" language="[null]" copy_resource_id="[null]" person_id="[null]"/> <!-- java project copy used in view --> <projects long_name="java project" id="4" scope="FIL" kee="cp-project:java" qualifier="TRK" name="java project" diff --git a/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml b/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml index f3a1b304598..c62b04aa28b 100644 --- a/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml +++ b/sonar-server/src/test/resources/org/sonar/server/platform/ServerSettingsTest/db/shared.xml @@ -4,7 +4,7 @@ <projects long_name="[null]" id="3333" scope="PRJ" qualifier="TRK" kee="mygroup:anotherproject" name="[null]" root_id="[null]" description="[null]" - enabled="true" language="java" copy_resource_id="[null]"/> + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]"/> <!-- general properties --> <properties prop_key="general_only" resource_id="[null]" user_id="[null]" text_value="is_general"/> |