Sha256: ad95561b758118ee11e5ebde963ced73824a7ce3f47af585055ad3f66a072644

Contents?: true

Size: 373 Bytes

Versions: 134

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

class SetEmailUniqueInOrganizationConditional < ActiveRecord::Migration[5.0]
  def change
    remove_index :decidim_users, %w(email decidim_organization_id)
    add_index :decidim_users, %w(email decidim_organization_id), where: "(deleted_at IS NULL)", name: "index_decidim_users_on_email_and_decidim_organization_id", unique: true
  end
end

Version data entries

134 entries across 134 versions & 2 rubygems

Version Path
decidim-core-0.20.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.20.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.19.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.18.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.19.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.17.2 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.18.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.17.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.16.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.17.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.16.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.15.2 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.15.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.15.0 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.14.4 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.14.3 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.14.2 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.14.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.13.1 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb
decidim-core-0.12.2 db/migrate/20170606102659_set_email_unique_in_organization_conditional.rb