Sha256: 583559da27404255dd942c8a7b26a22ec42bee3e51377b9225bf1f4268501fbc

Contents?: true

Size: 514 Bytes

Versions: 105

Compression:

Stored size: 514 Bytes

Contents

class CreateSlugs < ActiveRecord::Migration
  def self.up
    create_table :slugs do |t|
      t.string :name
      t.integer :sluggable_id
      t.integer :sequence, :null => false, :default => 1
      t.string :sluggable_type, :limit => 40
      t.string :scope
      t.datetime :created_at
    end
    add_index :slugs, :sluggable_id
    add_index :slugs, [:name, :sluggable_type, :sequence, :scope], :name => "index_slugs_on_n_s_s_and_s", :unique => true
  end

  def self.down
    drop_table :slugs
  end
end

Version data entries

105 entries across 95 versions & 9 rubygems

Version Path
refinerycms-0.9.6.32 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.4 generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.3 generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.31 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.30 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.29 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.28 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.27 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.2 generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.26 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.25 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.1 generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.0 generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.0.beta3 generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.0.beta2 generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.24 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.23 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.22 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb
friendly_id-3.0.0.beta1 generators/friendly_id/templates/create_slugs.rb
refinerycms-0.9.6.21 vendor/plugins/friendly_id/generators/friendly_id/templates/create_slugs.rb