Permalink
Browse files

Revert "changed allowed_children_cache type from string to text so ol…

…d (mysql) versions dont truncate the contents and wreck havoc. Fixes GH-316"

This reverts commit d87e9a7.

It is generally not a good idea to change the rails migrations. The changes may not be reflected for those who had run the db:migrate before the commit.
  • Loading branch information...
1 parent 9753ad2 commit c666e5299e735519bc2bf4a7c8f2223146a93da4 @blj blj committed Feb 10, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 db/migrate/20110902203823_add_allowed_children_cache_to_pages.rb
  2. +2 −2 db/schema.rb
@@ -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
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 => 20110902203823) do
create_table "assets", :force => true do |t|
t.string "caption"
@@ -89,7 +89,7 @@
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.string "allowed_children_cache", :default => ""
end
add_index "pages", ["class_name"], :name => "altered_pages_class_name"

0 comments on commit c666e52

Please sign in to comment.