# Migrate question?

**URL:** <https://www.ruby-forum.com/t/migrate-question/65771>\
**Category:** Ruby-Forum\
**Created:** [August 21, 2006, 10:30am UTC](https://www.ruby-forum.com/t/migrate-question/65771 "2006-08-21T10:30:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincentcao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vincentcao](https://www.ruby-forum.com/u/vincentcao)\
**Post date:** [August 21, 2006, 10:30am UTC](https://www.ruby-forum.com/t/migrate-question/65771/1 "2006-08-21T10:30:40Z")

</div>

my old schema version was 4,if i update the newest version to 12, my  
old data will be affected?or does these changes make my old version  
forum don’t work well:  
same situation like my,if i want update my rforum as you guys  
provided,what’s  
key things should i pay attention, for i want my rforum work as well as  
it used to be?

---

<div class="post-metadata">

**Author:** ![vincentcao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vincentcao](https://www.ruby-forum.com/u/vincentcao)\
**Post date:** [August 21, 2006, 4:23pm UTC](https://www.ruby-forum.com/t/migrate-question/65771/2 "2006-08-21T16:23:36Z")

</div>

Thanks, I have checked already this afternoon, so can you give me some  
advise  
about one of my anther post named ‘Search Failure’,it seems the ferret  
does not  
work in my new rforum.you guys can see my log details there.  
I check the code,and try to debug, problem seems occured here:

def find\_id\_by\_contents(q, options = {})  
options[:num\_docs] = configuration[:max\_results] if options[:num\_docs]  
== :all  
result = []  
index = self.ferret\_index  
hits = index.search(q, options)  
hits.each do |hit, score|  
# only collect result data if we intend to return it  
doc = index[hit]  
model = configuration[:store\_class\_name] ? doc[:class\_name]  
:self.name  
=here= if block\_given?  
yield model, doc[:id].to\_i, score  
else  
result \<\< { :model =\> model, :id =\> doc[:id], :score =\>  
score }  
end  
end  
logger.debug “id\_score\_model array: #{result.inspect}”  
return block\_given? ? hits.total\_hits : result  
end

am i must config sth for ferret? in fact ,i install ferret already :  
gem install ferret

---

<div class="post-metadata">

**Author:** ![vincentcao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vincentcao](https://www.ruby-forum.com/u/vincentcao)\
**Post date:** [August 21, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/migrate-question/65771/3 "2006-08-21T16:03:59Z")

</div>

Vincent Tsao wrote:

> my old schema version was 4,if i update the newest version to 12, my  
> old data will be affected?

No. Just use “rake migrate” to upgrade the database, and it should work  
with the new version. But make a backup of your database just in case.
