diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-19 11:02:08 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-20 17:17:53 +0200 |
commit | 3201be2777a5cc1db23b0bb9b4b7130da6327fe4 (patch) | |
tree | 4a91bcf157460b3472d3a23f62791737b1451cb6 /server/sonar-web/src/main/webapp | |
parent | a729e675c7fbe66212502068f4f38ea2b74f899d (diff) | |
download | sonarqube-3201be2777a5cc1db23b0bb9b4b7130da6327fe4.tar.gz sonarqube-3201be2777a5cc1db23b0bb9b4b7130da6327fe4.zip |
SONAR-8134 add organization uuid to unique index of table GROUP_ROLES
Diffstat (limited to 'server/sonar-web/src/main/webapp')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1418_include_organization_uuid_in_unique_index_of_group_roles.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1418_include_organization_uuid_in_unique_index_of_group_roles.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1418_include_organization_uuid_in_unique_index_of_group_roles.rb new file mode 100644 index 00000000000..8e26506f91a --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1418_include_organization_uuid_in_unique_index_of_group_roles.rb @@ -0,0 +1,31 @@ +# +# 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. +# + +# +# SonarQube 6.2 +# +class IncludeOrganizationUuidInUniqueIndexOfGroupRoles < ActiveRecord::Migration + + def self.up + drop_index_quietly :group_roles, :uniq_group_roles + + add_index 'group_roles', ['organization_uuid', 'group_id', 'resource_id', 'role'], :unique => true, :name => 'uniq_group_roles' + end +end |