diff options
author | Joe Sak <joe@joesak.com> | 2011-06-14 13:53:22 -0500 |
---|---|---|
committer | Joe Sak <joe@joesak.com> | 2011-06-14 13:53:22 -0500 |
commit | 434ad6535e82a5bf6ba43d50e8ad00c763e041a8 (patch) | |
tree | c84235b0d8398c348a71151f75a1b62262ccaa70 | |
parent | 0fb08973fddd801f53c32d0be52f94a891c1bce7 (diff) | |
download | refinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.tar.gz refinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.tar.bz2 refinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.zip |
cached slugs speed things up
-rw-r--r-- | db/migrate/5_add_cached_slugs.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |