Sha256: 3a4298eab3be793f8ae19e65b2723cb1ef2d5717b77fc898aeadf100a0caa6a1
Contents?: true
Size: 580 Bytes
Versions: 139
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true class ChangeDecidimIdentitiesProviderUidIndexUniqueness < ActiveRecord::Migration[5.0] def change remove_index :decidim_identities, [:provider, :uid] add_index :decidim_identities, [:provider, :uid, :decidim_organization_id], unique: true, name: "decidim_identities_provider_uid_organization_unique" Decidim::Identity.includes(:user).find_each do |identity| identity.organization = identity.user.organization identity.save! end end end
Version data entries
139 entries across 139 versions & 2 rubygems