#38 new

capistrano / rake task for changed model?

Reported by Jens | February 13th, 2010 @ 12:37 AM

If a model changes:
* is restarting the drb server sufficient to get the system aware of the new fields? (i think this is true) * if so, will the system happily add the new data to new objects, and treat those new fields in old objects as blank/empty? * if so. i guess the only concern is: if a model change / migration results in old objects having new fields with new data. In this case, one would need to re-index those objects.

I can't think of a general capistrano task that would automatically cover all edge cases without doing uneeded work in the common case (it would need run when migrations are run, AND detect if old objects have new data added).

Maybe I'll write a capistrano task for reindexing objects from model X created before date Y.

ACTUALLY-- maybe the capistrano task could do that, as long as the objects with the new data have their updated_at column updated appropriately-- for each migration, it could reindex all objects changed since immediately before the migration was applied.


No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket