creddit/db/migrate/20150806191452_add_friendly_id_to_user.rb

6 lines
155 B
Ruby

class AddFriendlyIdToUser < ActiveRecord::Migration
def change
add_column :users, :slug, :string
add_index :users, :slug, unique: true
end
end