Sha256: 01a16c4c80115cef6e61e1a1acab0884b125f1dfa0e3a0997b32d728d7692110

Contents?: true

Size: 683 Bytes

Versions: 2

Compression:

Stored size: 683 Bytes

Contents

class CreateFriendlyIdSlugs < ActiveRecord::Migration[6.0]
  def change
    create_table :rails_marketplace_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 :rails_marketplace_friendly_id_slugs, :sluggable_id
    # add_index :rails_marketplace_friendly_id_slugs, [:slug, :sluggable_type]
    # add_index :rails_marketplace_friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
    # add_index :rails_marketplace_friendly_id_slugs, :sluggable_type
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_marketplace-0.0.2 db/migrate/20161110021043_create_friendly_id_slugs.rb
rails_marketplace-0.0.1 db/migrate/20161110021043_create_friendly_id_slugs.rb