Sha256: 24ffcc1f6069490467cc8cd027f5779a0948297831b2c59af2a7d4e5b350df8c

Contents?: true

Size: 658 Bytes

Versions: 16

Compression:

Stored size: 658 Bytes

Contents

class AddLocaleToFriendlyIdSlugs < ActiveRecord::Migration[6.1]
  def change
    add_column :friendly_id_slugs, :locale, :string, null: :false, after: :scope

    remove_index :friendly_id_slugs, [:slug, :sluggable_type]
    add_index :friendly_id_slugs, [:slug, :sluggable_type, :locale], length: { slug: 140, sluggable_type: 50, locale: 2 }
    remove_index :friendly_id_slugs, [:slug, :sluggable_type, :scope]
    add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope, :locale], length: { slug: 70, sluggable_type: 50, scope: 70, locale: 2 }, unique: true, name: :index_friendly_id_slugs_unique
    add_index :friendly_id_slugs, :locale
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
spree_core-4.10.1 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.10.0 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.9.0 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.8.3 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.8.2 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.7.3 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.6 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.5 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.7.2 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.7.1 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.4 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.7.0 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.3 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.2 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.1 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb
spree_core-4.6.0 db/migrate/20220802070609_add_locale_to_friendly_id_slugs.rb