aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2011-06-14 13:53:22 -0500
committerJoe Sak <joe@joesak.com>2011-06-14 13:53:22 -0500
commit434ad6535e82a5bf6ba43d50e8ad00c763e041a8 (patch)
treec84235b0d8398c348a71151f75a1b62262ccaa70 /db
parent0fb08973fddd801f53c32d0be52f94a891c1bce7 (diff)
downloadrefinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.tar.gz
refinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.tar.bz2
refinerycms-blog-434ad6535e82a5bf6ba43d50e8ad00c763e041a8.zip
cached slugs speed things up
Diffstat (limited to 'db')
-rw-r--r--db/migrate/5_add_cached_slugs.rb11
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