To edit pages or tickets please login with username/password: aaf/aaf

Ticket #200 (new enhancement)

Opened 8 months ago

Last modified 8 months ago

capistrano / rake task for changed model?

Reported by: aaf Assigned to: jk
Priority: major Milestone: 0.5
Component: 0plugin Version:
Keywords: Cc: j@jjb.cc

Description

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.

Thoughts?

Change History

(in reply to: ↑ description ) 02/03/08 00:26:58 changed by aaf

Replying to aaf:

* if so, will the system happily add the new data to new objects, and treat those new fields in old objects as blank/empty?

To be more clear: "if so, will AAF happily index all of the columns in new data, and treat the new columns in old objects as blank/empty?"

02/04/08 13:19:09 changed by jk

Changing fields are no problem at all and yes, they will be picked up when the DRb server is restarted.

For updating the index to get the new field's data of existing records - why not just call ferret_update on them in the migration? That's what I'd do, if rebuilding the whole index from scratch wasn't an option.

02/04/08 17:42:56 changed by aaf

To edit pages or tickets please login with username/password: aaf/aaf