aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
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