Create an upgrade path

sirkitree - March 5, 2009 - 05:43
Project:Activity
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

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

#1

63reasons - July 14, 2009 - 11:08

subscribing

#2

pribeh - July 24, 2009 - 22:41

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.

#3

sirkitree - August 2, 2009 - 16:23

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.

#4

saturnin - September 10, 2009 - 16:14

subscribing

#5

dgtlmoon - October 26, 2009 - 01:47

ping

#6

geshan - November 12, 2009 - 15:29

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

#7

Scott Reynolds - January 18, 2010 - 22:23

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.

#8

okday - March 5, 2010 - 02:55

subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.