aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-11 07:51:27 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-07-16 22:23:42 +0200
commitef86099046b0d6e3700f6ab23f36c9a5914506f7 (patch)
tree704778b9005452a0643a68bec81d0298749e7757 /server/sonar-web/src/main
parent9d5a1bbb6548805e6149ef3a93113998291ea9f6 (diff)
downloadsonarqube-ef86099046b0d6e3700f6ab23f36c9a5914506f7.tar.gz
sonarqube-ef86099046b0d6e3700f6ab23f36c9a5914506f7.zip
SONAR-6716 Move some additions of columns and indices
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb11
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb3
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/061_create_measure_data.rb3
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb34
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb34
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb34
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/230_increase_qualifier_size.rb39
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/250_add_snapshots_build_date.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_create_rule_and_active_rule_notes.rb (renamed from server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_add_rule_and_active_rule_notes.rb)2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/254_add_metrics_delete_historical_data.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/306_ignore_loaded_dashboards.rb44
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/321_add_index_on_resource_root_id.rb34
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/330_add_created_at_on_projects.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/333_update_language_key_max_size.rb30
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/397_add_index_to_users_login.rb31
19 files changed, 17 insertions, 436 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
index b15f0d85218..7ec4c2c5fbe 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/001_initial_schema.rb
@@ -24,12 +24,14 @@ class InitialSchema < ActiveRecord::Migration
t.column :description, :string, :null => true, :limit => 2000
t.column :enabled, :boolean, :null => false, :default => true
t.column 'scope', :string, :limit => 3
- t.column 'qualifier', :string, :limit => 3
+ t.column 'qualifier', :string, :limit => 10, :null => true
t.column 'kee', :string, :limit => 400
t.column 'root_id', :integer
- t.column :language, :string, :null => true, :limit => 5
+ t.column :language, :string, :null => true, :limit => 20
t.column :copy_resource_id, :integer, :null => true
t.column :long_name, :string, :null => true, :limit => 256
+ t.column :person_id, :integer, :null => true
+ t.column :created_at, :datetime, :null => true
end
create_table :snapshots do |t|
@@ -38,13 +40,15 @@ class InitialSchema < ActiveRecord::Migration
t.column :parent_snapshot_id, :integer, :null => true
t.column :status, :string, :null => false, :default => 'U', :limit => 4
t.column :islast, :boolean, :null => false, :default => false
- t.column 'scope', :string, :limit => 3
+ t.column 'scope', :string, :limit => 10, :null => true
t.column 'qualifier', :string, :limit => 3
t.column 'root_snapshot_id', :integer
t.column 'version', :string, :limit => 60, :null => true
t.column :path, :string, :null => true, :limit => 96
t.column :depth, :integer, :null => true
t.column :root_project_id, :integer, :nullable => true
+ t.column 'build_date', :datetime, :null => true
+ t.column 'purge_status', :integer, :null => true
end
create_table :metrics do |t|
@@ -62,6 +66,7 @@ class InitialSchema < ActiveRecord::Migration
t.column 'best_value', :decimal, :null => true, :precision => 30, :scale => 20
t.column 'optimized_best_value', :boolean, :null => true
t.column 'hidden', :boolean, :null => true
+ t.column 'delete_historical_data', :boolean, :null => true
end
create_table :project_measures do |t|
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb
index 5a218212bf3..304aecaf4e5 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/002_index_database.rb
@@ -20,11 +20,14 @@
class IndexDatabase < ActiveRecord::Migration
def self.up
+ add_index 'projects', 'root_id', :name => 'projects_root_id'
+ add_index :project_measures, [:snapshot_id, :metric_id], :name => 'measures_sid_metric'
add_index :rules_parameters, :rule_id, :name => 'rules_parameters_rule_id'
add_index :snapshots, :project_id, :name => 'snapshot_project_id'
add_index :snapshots, :parent_snapshot_id, :name => 'snapshots_parent'
add_index :snapshots, :root_snapshot_id, :name => 'snapshots_root'
+ add_index :snapshots, :qualifier, :name => 'snapshots_qualifier'
add_index :metrics, :name, :unique => true, :name => 'metrics_unique_name'
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb
index e8eb77b0a0e..dd55c2fcaf1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/010_create_users.rb
@@ -31,5 +31,7 @@ class CreateUsers < ActiveRecord::Migration
t.column :remember_token, :string, :limit => 500, :null => true
t.column :remember_token_expires_at, :datetime
end
+
+ add_index :users, :login, :name => 'users_login', :unique => true
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/061_create_measure_data.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/061_create_measure_data.rb
index 05b9ffa2888..aa99f4eeb85 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/061_create_measure_data.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/061_create_measure_data.rb
@@ -25,7 +25,8 @@ class CreateMeasureData < ActiveRecord::Migration
t.column :snapshot_id, :integer, :null => true
t.column :data, :binary, :null => true
end
- add_index :measure_data, :measure_id, :name => 'measure_data_measure_id'
+ add_index :measure_data, :measure_id, :name => 'measure_data_measure_id'
+ add_index :measure_data, :snapshot_id, :name => 'm_data_sid'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb
index 7c347a25112..381ab693080 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/080_create_groups_users.rb
@@ -25,6 +25,6 @@ class CreateGroupsUsers < ActiveRecord::Migration
t.integer :group_id
end
add_index "groups_users", "user_id", :name => 'index_groups_users_on_user_id'
- add_index "groups_users", "group_id", :name => 'index_groups_users_on_group_id'
+ add_index "groups_users", "group_id", :name => 'index_groups_users_on_group_id'
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb
deleted file mode 100644
index 46ee71a7481..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/118_add_snapshots_qualifier_index.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.2
-#
-class AddSnapshotsQualifierIndex < ActiveRecord::Migration
-
- def self.up
- begin
- add_index :snapshots, :qualifier, :name => 'snapshots_qualifier'
- rescue
- # already exists
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb
deleted file mode 100644
index 3ba8663e75c..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/119_add_measures_sid_metric_index.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.2
-#
-class AddMeasuresSidMetricIndex < ActiveRecord::Migration
-
- def self.up
- begin
- add_index :project_measures, [:snapshot_id, :metric_id], :name => 'measures_sid_metric'
- rescue
- # already exists
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb
deleted file mode 100644
index 60b5ecf7baf..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/167_add_index_to_measure_data_snapshot.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.5
-#
-class AddIndexToMeasureDataSnapshot < ActiveRecord::Migration
-
- def self.up
- begin
- add_index :measure_data, :snapshot_id, :name => 'm_data_sid'
- rescue
- # already exists
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/230_increase_qualifier_size.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/230_increase_qualifier_size.rb
deleted file mode 100644
index 3a278c99734..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/230_increase_qualifier_size.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.13
-#
-class IncreaseQualifierSize < ActiveRecord::Migration
-
- def self.up
- if dialect()=='sqlserver'
- remove_index :snapshots, :name => 'snapshots_qualifier'
- end
-
- change_column('snapshots', 'qualifier', :string, :limit => 10, :null => true)
- change_column('projects', 'qualifier', :string, :limit => 10, :null => true)
-
- if dialect()=='sqlserver'
- add_index :snapshots, :qualifier, :name => 'snapshots_qualifier'
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/250_add_snapshots_build_date.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/250_add_snapshots_build_date.rb
deleted file mode 100644
index ed2e4a4a8f2..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/250_add_snapshots_build_date.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.14
-#
-class AddSnapshotsBuildDate < ActiveRecord::Migration
-
- def self.up
- add_column 'snapshots', 'build_date', :datetime, :null => true
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb
deleted file mode 100644
index 56503b69cd3..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/251_add_snapshots_purge_status.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.14
-#
-class AddSnapshotsPurgeStatus < ActiveRecord::Migration
-
- def self.up
- add_column 'snapshots', 'purge_status', :integer, :null => true
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_add_rule_and_active_rule_notes.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_create_rule_and_active_rule_notes.rb
index d3208f80a72..0cda41dd2f3 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_add_rule_and_active_rule_notes.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/252_create_rule_and_active_rule_notes.rb
@@ -21,7 +21,7 @@
#
# Sonar 2.14
#
-class AddRuleAndActiveRuleNotes < ActiveRecord::Migration
+class CreateRuleAndActiveRuleNotes < ActiveRecord::Migration
def self.up
create_table :active_rule_notes do |t|
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/254_add_metrics_delete_historical_data.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/254_add_metrics_delete_historical_data.rb
deleted file mode 100644
index 7c83d30bc72..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/254_add_metrics_delete_historical_data.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.14
-#
-class AddMetricsDeleteHistoricalData < ActiveRecord::Migration
-
- def self.up
- add_column 'metrics', 'delete_historical_data', :boolean, :null => true
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb
deleted file mode 100644
index 094a44d49fe..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/261_add_projects_person_id.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 2.14
-#
-class AddProjectsPersonId < ActiveRecord::Migration
-
- def self.up
- add_column 'projects', 'person_id', :integer, :null => true
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/306_ignore_loaded_dashboards.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/306_ignore_loaded_dashboards.rb
deleted file mode 100644
index ff8a9337273..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/306_ignore_loaded_dashboards.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 3.1
-#
-class IgnoreLoadedDashboards < ActiveRecord::Migration
- class Dashboard < ActiveRecord::Base
- end
-
- class LoadedTemplate < ActiveRecord::Base
- end
-
- def self.up
- mark_dashboard_as_loaded('Projects')
- mark_dashboard_as_loaded('Treemap')
- mark_dashboard_as_loaded('My favourites')
- end
-
- def self.mark_dashboard_as_loaded(name)
- if Dashboard.find(:first, :conditions => {:name => name, :user_id => nil})
- unless LoadedTemplate.find(:first, :conditions => {:kee => name, :template_type => 'DASHBOARD'})
- LoadedTemplate.create(:kee => name, :template_type => 'DASHBOARD').save
- end
- end
- end
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/321_add_index_on_resource_root_id.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/321_add_index_on_resource_root_id.rb
deleted file mode 100644
index ce6d52098ca..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/321_add_index_on_resource_root_id.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 3.2
-#
-class AddIndexOnResourceRootId < ActiveRecord::Migration
-
- def self.up
- begin
- add_index 'projects', 'root_id', :name => 'projects_root_id'
- rescue
- # Ignore, already exists
- end
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/330_add_created_at_on_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/330_add_created_at_on_projects.rb
deleted file mode 100644
index 8bea0aef897..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/330_add_created_at_on_projects.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 3.3
-#
-class AddCreatedAtOnProjects < ActiveRecord::Migration
-
- def self.up
- add_column 'projects', 'created_at', :datetime, :null => true
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/333_update_language_key_max_size.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/333_update_language_key_max_size.rb
deleted file mode 100644
index b94b0b7d677..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/333_update_language_key_max_size.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 3.3
-#
-class UpdateLanguageKeyMaxSize < ActiveRecord::Migration
-
- def self.up
- change_column :projects, :language, :string, :null => true, :limit => 20
- end
-
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/397_add_index_to_users_login.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/397_add_index_to_users_login.rb
deleted file mode 100644
index d750fc3487e..00000000000
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/397_add_index_to_users_login.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube 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.
-#
-# SonarQube 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 this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-
-#
-# Sonar 3.6
-#
-class AddIndexToUsersLogin < ActiveRecord::Migration
-
- def self.up
- add_index :users, :login, :name => 'users_login', :unique => true
- end
-
-end
-