Sha256: a8ae8888d442a75441a46133b63bbff54184d2c621fa274a1927dd931f7e4a9e

Contents?: true

Size: 539 Bytes

Versions: 6

Compression:

Stored size: 539 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]
		add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
		add_index :friendly_id_slugs, :sluggable_type
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
proclaim-0.5.6 db/migrate/20150213015321_create_friendly_id_slugs.rb
proclaim-0.5.5 db/migrate/20150213015321_create_friendly_id_slugs.rb
proclaim-0.5.3 db/migrate/20150213015321_create_friendly_id_slugs.rb
proclaim-0.5.2 db/migrate/20150213015321_create_friendly_id_slugs.rb
proclaim-0.5.1 db/migrate/20150213015321_create_friendly_id_slugs.rb
proclaim-0.5.0 db/migrate/20150213015321_create_friendly_id_slugs.rb