We need to create an upgrade path from 6.x-1.x to 6.x-2.x

Comments

MisterSpeed’s picture

subscribing

pribeh’s picture

Hi there, just checking to make sure whether or not there will be an upgrade path from 1 to 2 that will preserve the activities from version 1 in such a way that they can be seamlessly used with the activity 2's publisher templates. If not than I just might start using activity 2 for a site that I'm running and work with erasing all the old 1.0 activities of the site's users.

Thanks.

sirkitree’s picture

It's definitely something I'd like to have before we make a full release, however I've not much time or need to work on this myself. I've just posted some code that will allow you to create activity records on an existing site #529318: Generate activity on an existing site + reset activities option. which might give someone some ideas on how to go about writing a migration path from 1.x to 2.x.

saturnin’s picture

subscribing

dgtlmoon’s picture

ping

geshan’s picture

It would be great if there is a solid upgrade path.

Scott Reynolds’s picture

Here are some notes for a db update

  1. Mapping Activity to the new Activity table
    • aid and uid stay the same
    • module becomes type
    • operation becomes op
    • all nid become NULL columns to be filled in later step
  2. Activity targets
    • drop the role field
    • add the amid field that will be filled in at a later step
    • change target_uid to uid
    • Change all uid == -1 to uid = 0
  3. Generate messages and store them away
    This is the tricky part that probably needs to happen first
    • For each message and for each role, activity_token_replace($activity) to get the message and store it away in the activity_message table. in order to do that we need to have an activity_load($aid) as well that is just a bit simplified (no activity_invoke or comments)

These notes fail to address at least to other parts of Activity. The Activity Comments will need their own upgrade script in that module. And the activity user opt out settings will somehow need to be preserved.

Edit:Please note that I have very little motivation to create an upgrade path. I am not a maintainer of the 1.x branch and I have never nor will I ever run 1.x on any site. So I don't have a need for this and it happens to be quite a bit of work. I don't plan on doing all this, but I will review patches to ensure the semantics of the messages are preserved. Perhaps one day I will but I don't envision it. And I don't personally have a problem creating a official 2.X release without an upgrade path.

okday’s picture

subscribing

moscheIT’s picture

subscribing

Steven Jones’s picture

subscribe, we'll be needing this, and might be able to devote some time over to implementation.

sirkitree’s picture

Status: Active » Closed (won't fix)

I don't think we're ever going to get this. We've created a way for regenerating activity messages and I think we're going to just stick with that method. Please reopen if you come up with a patch and we'll review it, but I don't think either Scott or myself are going to write one.

codevoice’s picture

Status: Closed (won't fix) » Active

Sorry to reopen this, I know sirkitree made himself clear, but what have you other subscribers done as far as upgrading? I'm in the same boat, on 1.x in a very, very active site and would like to upgrade, but with no option to do so I'm stuck.

So, looking to discuss work-around, hacks, whatever you guys managed.