diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-06-14 18:44:35 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-06-16 13:49:19 +0200 |
commit | f5ba27efa5e59cfbc9b3395b402812971f266aa8 (patch) | |
tree | 50ffbc12b04b0cb29261d76a8646ef270062d8de /server/sonar-web/src/main/webapp | |
parent | 4b7dc3b9c7e922dc494bc1e985cee0d277883e64 (diff) | |
download | sonarqube-f5ba27efa5e59cfbc9b3395b402812971f266aa8.tar.gz sonarqube-f5ba27efa5e59cfbc9b3395b402812971f266aa8.zip |
SONAR-7738 ensure remove_index is reentrant
Diffstat (limited to 'server/sonar-web/src/main/webapp')
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 |