Sha256: 38e3db05b5b62efe3d595b1f942f25f6f8b31af506f2be3bebbea65aa6323b5a

Contents?: true

Size: 300 Bytes

Versions: 15

Compression:

Stored size: 300 Bytes

Contents

class AddUniquenessIndexToUsersGroups < ActiveRecord::Migration
  def up
    add_index(:faalis_groups_users, [ :user_id, :group_id ],
              unique: true, name: 'by_user_and_group')
  end

  def down
    remove_index(:faalis_groups_users,
                 name: 'by_user_and_group')
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
faalis-2.2.0.pre.rc1 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.2.1 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.2.0 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.1.1 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.1.0 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.8 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.7 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.5 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.4 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.3 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.1 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.0 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.0.rc6 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.0.rc5 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb
faalis-2.0.0.rc4 db/migrate/20151122115129_add_uniqueness_index_to_users_groups.rb