Project:Office Hours
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi module users,
i'm pondering a release of a stable 6 version, or at least a beta. I would like some feedback regarding the stability of the branch.
Thanks!

Comments

#1

#2

I would not go to beta without a reliable upgrade path that preserves data for users migrating from 5.x->6.x. See 'On backward compatibility' for how core handles this: "While the upgrade path will reliably preserve your data, there is no backward compatibility with the previous Drupal code." I think this user expectation needs to be honored.

#3

Of course, an upgrade path is very important and will not be neglected. I presume that once we will solve the module issues themselves, the upgrade path will be available also.
If you have a D5 version running, I'll be grateful for bug reports on upgrades.

#4

I'm moving a couple sites from 5x to 6x and here's what i came up with for my data migration path. The first steps involve exporting data out into csv and doing a search and replace to take out the colons from the time. This could be done in script if someone wanted to take the time to do it.

As always make a fresh backup of your DB or the affected tables.
1. Export content_(your conent name) in csv from your 5x database
2. open file in your favorite text editor
3. search for all colons : and replace them with nothing
4. empty the corresponding 6x table
5. import the csv file to your 6x database (be sure to specify the columns as the order changed from 5x to 6x)
6. Run the following php code;

drupal_load('module', 'content');
$result = db_query("SELECT * FROM {". content_instance_tablename() ."} WHERE widget_type = 'office_hours'");
while ($field_instance = db_fetch_object($result)) {
$name = $field_instance->field_name;
$nids = db_query("SELECT DISTINCT(nid) FROM content_".$name."");
while ($field = db_fetch_array($nids)) {
    $nid = $field['nid'];
    $rows = db_query("SELECT delta FROM content_".$name." WHERE nid = $nid");
    $hours = array();
    while ($instance = db_fetch_array($rows)) {
      $delta = $instance['delta'];
      $hours[$delta] = 1;
    }
    $count = 0;
    while ($count < 14) {
      if (!$hours[$count]) {
        update_sql("INSERT INTO content_".$name." ( `vid` , `nid` , `delta` , `".$name."_day`, `".$name."_starthours` , `".$name."_endhours` ) VALUES ( $nid, $nid, $count, NULL, NULL, NULL)");
      }
      $count++;
    }
  }
}

Hopefully this helps someone or helps further develop the upgrade path in the module itself. Let me know if you have any questions.

#5

versions for D6 and D7 are available for a while now.

#6

Status:active» fixed

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here