cached slugs speed things up
This commit is contained in:
parent
0fb08973fd
commit
434ad6535e
1 changed files with 11 additions and 0 deletions
11
db/migrate/5_add_cached_slugs.rb
Normal file
11
db/migrate/5_add_cached_slugs.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue