Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

slug migrations

  • Loading branch information...
commit 72e43af3f6316407796ff176a2b84ae89ca36d46 1 parent b063244
voodoo authored
10 db/migrate/20110824233657_add_slug_to_users.rb
View
@@ -0,0 +1,10 @@
+class AddSlugToUsers < ActiveRecord::Migration
+ def self.up
+ add_column :users, :slug, :string
+ add_index :users, :slug, :unique => true
+ end
+
+ def self.down
+ remove_column :users, :slug
+ end
+end
10 db/migrate/20110825000121_add_slug_to_news_items.rb
View
@@ -0,0 +1,10 @@
+class AddSlugToNewsItems < ActiveRecord::Migration
+ def self.up
+ add_column :news_items, :slug, :string
+ add_index :news_items, :slug, :unique => true
+ end
+
+ def self.down
+ remove_column :news_items, :slug
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.