Merge pull request #43 from Skud/friendlymembers

missed these migrations. d'oh.
This commit is contained in:
Skud committed 2012-11-06 02:44:07 -08:00
commit 913695e795
2 files changed
+16

No files matched your search

@@ -0,0 +1,6 @@
class AddSlugToUsers < ActiveRecord::Migration
def change
add_column :users, :slug, :string
add_index :users, :slug, unique: true
end
end
@@ -0,0 +1,10 @@
class GiveOldMembersNewSlugs < ActiveRecord::Migration
def up
User.find_each(&:save)
end
# note: this is basically impossible to reverse without removing
# friendly_id, because friendly_id automatically updates the slug when
# you save the object.
end