aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/webapp
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-06-14 18:44:35 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2016-06-16 13:49:19 +0200
commitf5ba27efa5e59cfbc9b3395b402812971f266aa8 (patch)
tree50ffbc12b04b0cb29261d76a8646ef270062d8de /server/sonar-web/src/main/webapp
parent4b7dc3b9c7e922dc494bc1e985cee0d277883e64 (diff)
downloadsonarqube-f5ba27efa5e59cfbc9b3395b402812971f266aa8.tar.gz
sonarqube-f5ba27efa5e59cfbc9b3395b402812971f266aa8.zip
SONAR-7738 ensure remove_index is reentrant
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1205_drop_resource_index_rid_from_resource_index.rb6
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb12
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_drop_index_projects_root_id_from_projects.rb6
3 files changed, 20 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1205_drop_resource_index_rid_from_resource_index.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1205_drop_resource_index_rid_from_resource_index.rb
index e44007e7046..edc42e1cfce 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1205_drop_resource_index_rid_from_resource_index.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1205_drop_resource_index_rid_from_resource_index.rb
@@ -24,6 +24,10 @@
class DropResourceIndexRidFromResourceIndex < ActiveRecord::Migration
def self.up
- remove_index :resource_index, :name => 'resource_index_rid'
+ begin
+ remove_index :resource_index, :name => 'resource_index_rid'
+ rescue
+ #ignore
+ end
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb
index 6b0588494bf..3bc97373bce 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1212_drop_snapshot_project_id_from_snapshots.rb
@@ -24,7 +24,15 @@
class DropSnapshotProjectIdFromSnapshots < ActiveRecord::Migration
def self.up
- remove_index :snapshots, :name => 'snapshot_project_id'
- remove_index :snapshots, :name => 'snapshots_root_project_id'
+ begin
+ remove_index :snapshots, :name => 'snapshot_project_id'
+ rescue
+ #ignore
+ end
+ begin
+ remove_index :snapshots, :name => 'snapshots_root_project_id'
+ rescue
+ #ignore
+ end
end
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_drop_index_projects_root_id_from_projects.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_drop_index_projects_root_id_from_projects.rb
index bb859a82616..038b01da20e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_drop_index_projects_root_id_from_projects.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1226_drop_index_projects_root_id_from_projects.rb
@@ -24,6 +24,10 @@
class DropIndexProjectsRootIdFromProjects < ActiveRecord::Migration
def self.up
- remove_index :projects, :name => 'projects_root_id'
+ begin
+ remove_index :projects, :name => 'projects_root_id'
+ rescue
+ #ignore
+ end
end
end