diff --git a/db/migrate/20150902120006_remove_parent_id_from_comments.rb b/db/migrate/20150902120006_remove_parent_id_from_comments.rb new file mode 100644 index 000000000..219196533 --- /dev/null +++ b/db/migrate/20150902120006_remove_parent_id_from_comments.rb @@ -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