Sha256: 1f39f98fa9826739a15abe9b7b86e448e67259b703e212c80fd7c357f0866386

Contents?: true

Size: 325 Bytes

Versions: 9

Compression:

Stored size: 325 Bytes

Contents

class CreateSlugs < ActiveRecord::Migration
  def change
    create_table :slugs do |t|
      t.integer :sluggable_id
      t.string :sluggable_type
      t.string :value

      t.timestamps null: false
    end

    add_index :slugs, :sluggable_id
    add_index :slugs, :sluggable_type
    add_index :slugs, :value
  end
end

Version data entries

9 entries across 5 versions & 1 rubygems

Version Path
slugs-5.1.0 lib/generators/slugs/install/templates/migration.rb
slugs-4.0.0.3 lib/generators/slugs/install/templates/migration.rb
slugs-4.0.0.3 test/dummy/db/migrate/20161124162802_create_slugs.rb
slugs-4.0.0.2 lib/generators/slugs/install/templates/migration.rb
slugs-4.0.0.2 test/dummy/db/migrate/20161124162802_create_slugs.rb
slugs-4.0.0.1 test/dummy/db/migrate/20161124162802_create_slugs.rb
slugs-4.0.0.1 lib/generators/slugs/install/templates/migration.rb
slugs-4.0.0.0 test/dummy/db/migrate/20161124162802_create_slugs.rb
slugs-4.0.0.0 lib/generators/slugs/install/templates/migration.rb