adds migration to remove AaCwT columns

it migrates existing comments to ancestry
This commit is contained in:
Juanjo Bazán
2015-09-02 19:24:57 +02:00
parent dee2d0196b
commit 73f0b4b74e

View File

@@ -0,0 +1,9 @@
class RemoveParentIdFromComments < ActiveRecord::Migration
def change
Comment.build_ancestry_from_parent_ids! rescue nil
remove_column :comments, :parent_id, :integer
remove_column :comments, :lft, :integer
remove_column :comments, :rgt, :integer
end
end