]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4950 add unique index on GROUP_ROLES
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 19 Dec 2013 09:25:22 +0000 (10:25 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 19 Dec 2013 09:25:34 +0000 (10:25 +0100)
sonar-server/src/main/webapp/WEB-INF/db/migrate/482_add_unique_constraint_to_group_roles.rb

index 62752d2ad27f1bd5a39abf58cf4cacf50b5e9334..161b786996bd50946653af492051f561025c1df5 100644 (file)
@@ -40,5 +40,7 @@ class AddUniqueConstraintToGroupRoles < ActiveRecord::Migration
         end
       end
     end
+
+    add_index 'group_roles', ['group_id', 'resource_id', 'role'], :unique => true, :name => 'uniq_group_roles'
   end
 end