Sha256: 40388c527b087da2e0a09042503eddedcc9979a8b7690ec7f2eba72b92e11a92

Contents?: true

Size: 457 Bytes

Versions: 39

Compression:

Stored size: 457 Bytes

Contents

class CreateSluggedSlugs < ActiveRecord::Migration
  
  def self.up
    create_table :slugs do |t|
      t.string   :scope
      t.string   :slug
      t.integer  :record_id
      t.datetime :created_at
    end
    add_index :slugs, [:scope, :slug]
    add_index :slugs, [:scope, :record_id]
    add_index :slugs, [:scope, :slug, :created_at]
    add_index :slugs, [:scope, :record_id, :created_at]
  end

  def self.down
    drop_table :slugs
  end
  
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
artfully_ose-1.2.0.pre.11 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.10 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.9 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.8 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.7 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.6 db/migrate/20130723182754_create_slugged_slugs.rb
slugged-2.0.0 lib/generators/slugged/slugs/templates/migration.erb
artfully_ose-1.2.0.pre.5 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.4 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.3 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.2 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre.1 db/migrate/20130723182754_create_slugged_slugs.rb
artfully_ose-1.2.0.pre db/migrate/20130723182754_create_slugged_slugs.rb
slugged-1.1.0 lib/generators/slugged/slugs/templates/migration.erb
slugged-1.0.1 lib/generators/slugged/slugs/templates/migration.erb
slugged-1.0.0 lib/generators/slugged/slugs/templates/migration.erb
slugged-0.4.0 lib/generators/slugged/slugs/templates/migration.erb
slugged-0.3.3 lib/generators/slugged/slugs/templates/migration.erb
slugged-0.3.2 lib/generators/slugged/slugs/templates/migration.erb