aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20120227022021_add_slug_to_posts_and_categories.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20120227022021_add_slug_to_posts_and_categories.rb b/db/migrate/20120227022021_add_slug_to_posts_and_categories.rb
new file mode 100644
index 0000000..87d1291
--- /dev/null
+++ b/db/migrate/20120227022021_add_slug_to_posts_and_categories.rb
@@ -0,0 +1,9 @@
+class AddSlugToPostsAndCategories < ActiveRecord::Migration
+ def change
+ add_column Refinery::Blog::Post.table_name, :slug, :string
+ add_index Refinery::Blog::Post.table_name, :slug
+
+ add_column Refinery::Blog::Category.table_name, :slug, :string
+ add_index Refinery::Blog::Category.table_name, :slug
+ end
+end \ No newline at end of file