Permalink
Browse files

Merge pull request #317 from blj/316-allowed-children-cache

316 allowed children cache
  • Loading branch information...
2 parents 9753ad2 + e9c6419 commit db92b559ebba5a6487455cdd3605ade6e49ee24b @jfahrenkrug jfahrenkrug committed Feb 10, 2012
@@ -1,6 +1,6 @@
class AddAllowedChildrenCacheToPages < ActiveRecord::Migration
def self.up
- add_column :pages, :allowed_children_cache, :text, :default => ''
+ add_column :pages, :allowed_children_cache, :string, :limit => 1500, :default => ''
Page.reset_column_information
Page.find_each do |page|
page.save # update the allowed_children_cache
@@ -0,0 +1,9 @@
+class ChangePagesAllowedChildrenCacheToText < ActiveRecord::Migration
+ def self.up
+ change_column :pages, :allowed_children_cache, :text
+ end
+
+ def self.down
+ change_column :pages, :allowed_children_cache, :string, :limit => 1500
+ end
+end
View
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111016150725) do
+ActiveRecord::Schema.define(:version => 20120209231801) do
create_table "assets", :force => true do |t|
t.string "caption"
@@ -79,17 +79,17 @@
t.string "slug", :limit => 100
t.string "breadcrumb", :limit => 160
t.string "class_name", :limit => 25
- t.integer "status_id", :default => 1, :null => false
+ t.integer "status_id", :default => 1, :null => false
t.integer "parent_id"
t.integer "layout_id"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "published_at"
t.integer "created_by_id"
t.integer "updated_by_id"
- t.boolean "virtual", :default => false, :null => false
- t.integer "lock_version", :default => 0
- t.text "allowed_children_cache", :default => ""
+ t.boolean "virtual", :default => false, :null => false
+ t.integer "lock_version", :default => 0
+ t.text "allowed_children_cache", :limit => 1500, :default => ""
end
add_index "pages", ["class_name"], :name => "altered_pages_class_name"

0 comments on commit db92b55

Please sign in to comment.