Forum OpenACS Development: Re: New package: Redirect

Collapse
9: Re: New package: Redirect (response to 1)
Posted by Jade Rubick on
Yes, it's very easy to do.

However, that's part of the point. It would be an easy addition to Redirect. I'm not suggesting that anyone take it on at this point, but it would be an easy addition.

The way it would work would be:

there would be a table that had old_id and new_id

Redirect would also store the source directory and target directory, like it does now.

The only addition would be that when the source directory (redirect controlled) is called, it would also regexp the old_id out, and then when redirecting to the new directory, would substitute in the new_id from the mapping table.

Let's say I port data from ticket-tracker-lite to bug-tracker. In my migration script, I would call the Redirect API for each insert, also creating a mapping entry.

I personally would use this a lot. Actually, I see so much value in it, that I would consider writing it, if others felt it would be of use.

Collapse
10: Re: New package: Redirect (response to 9)
Posted by Randy O'Meara on
Sorry Jade. I missed the fact that the object id was also mapped. An index.vuh script couldn't do what you suggest unless it had access to the map. Your idea does have great merit in that it would provide *data migration* capability.