Sha256: 685b8a8bf7967b584d9cea3fcb76dfe2974db50ae70c0a8c74c63fc7b2245799

Contents?: true

Size: 660 Bytes

Versions: 13

Compression:

Stored size: 660 Bytes

Contents

class CreateFriendlyIdSlugs < ActiveRecord::Migration
  def change
    create_table :friendly_id_slugs do |t|
      t.string   :slug,           :null => false
      t.integer  :sluggable_id,   :null => false
      t.string   :sluggable_type, :limit => 50
      t.string   :scope
      t.datetime :created_at
    end
    add_index :friendly_id_slugs, :sluggable_id
    add_index :friendly_id_slugs, [:slug, :sluggable_type], length: { slug: 140, sluggable_type: 50 }
    add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], length: { slug: 70, sluggable_type: 50, scope: 70 }, unique: true
    add_index :friendly_id_slugs, :sluggable_type
  end
end

Version data entries

13 entries across 13 versions & 5 rubygems

Version Path
friendly_id-5.2.3 lib/friendly_id/migration.rb
friendly_id-5.2.2 lib/friendly_id/migration.rb
spina-blog-0.1.2 db/migrate/4_create_friendly_id_slugs.rb
spina-blog-0.1.1 db/migrate/4_create_friendly_id_slugs.rb
phcpress-9.1.2 db/migrate/20170509180858_create_friendly_id_slugs.rb
phcpress-9.1.1 db/migrate/20170509180858_create_friendly_id_slugs.rb
phcpress-9.1.0 db/migrate/20170509180858_create_friendly_id_slugs.rb
phcpress-9.0.0 db/migrate/20170509180858_create_friendly_id_slugs.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/friendly_id-5.2.1/lib/friendly_id/migration.rb
phcscriptcdn-6.0.0 db/migrate/20170423022446_create_friendly_id_slugs.rb
phcscriptcdn-6.0.0b db/migrate/20170423022446_create_friendly_id_slugs.rb
friendly_id-5.2.1 lib/friendly_id/migration.rb
friendly_id-5.2.0 lib/friendly_id/migration.rb