Sha256: 395741aa1e45c1652271bf0d7c5cfc624dd4327118bd1451ca8efb92aaf7864f
Contents?: true
Size: 649 Bytes
Versions: 108
Compression:
Stored size: 649 Bytes
Contents
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
108 entries across 108 versions & 2 rubygems