From 434ad6535e82a5bf6ba43d50e8ad00c763e041a8 Mon Sep 17 00:00:00 2001 From: Joe Sak Date: Tue, 14 Jun 2011 13:53:22 -0500 Subject: cached slugs speed things up --- db/migrate/5_add_cached_slugs.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 db/migrate/5_add_cached_slugs.rb (limited to 'db/migrate') diff --git a/db/migrate/5_add_cached_slugs.rb b/db/migrate/5_add_cached_slugs.rb new file mode 100644 index 0000000..c189302 --- /dev/null +++ b/db/migrate/5_add_cached_slugs.rb @@ -0,0 +1,11 @@ +class AddCachedSlugs < ActiveRecord::Migration + def self.up + add_column :blog_categories, :cached_slug, :string + add_column :blog_posts, :cached_slug, :string + end + + def self.down + remove_column :blog_categories, :cached_slug + remove_column :blog_posts, :cached_slug + end +end -- cgit v1.2.3