Sha256: 2901ab8059fae178933b1b2838e24b1c9c772219db5e96773eea0761286fbe2b

Contents?: true

Size: 711 Bytes

Versions: 8

Compression:

Stored size: 711 Bytes

Contents

# This migration comes from spree (originally 20170413211707)
class ChangeIndexesOnFriendlyIdSlugs < ActiveRecord::Migration[5.0]
  def change
    # Updating indexes to reflect changes in friendly_id v5.2
    # See: https://github.com/norman/friendly_id/pull/694/commits/9f107f07ec9d2a58bda5a712b6e79a8d8013e0ab
    remove_index :friendly_id_slugs, [:slug, :sluggable_type]
    remove_index :friendly_id_slugs, [:slug, :sluggable_type, :scope]
    add_index :friendly_id_slugs, [:slug, :sluggable_type], length: { name: 100, slug: 20, sluggable_type: 20 }
    add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], length: { name: 100, slug: 20, sluggable_type: 20, scope: 20 }, unique: true
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195966_change_indexes_on_friendly_id_slugs.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091907_change_indexes_on_friendly_id_slugs.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091907_change_indexes_on_friendly_id_slugs.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516191831_change_indexes_on_friendly_id_slugs.spree.rb