Update 2.x "update path" for most recent changes

boombatower - October 28, 2009 - 05:10
Project:Project Issue File Review
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:boombatower
Status:closed
Description

Place any previous update hooks in pifr module along with main bulk and update the pifr update path.

#1

boombatower - October 28, 2009 - 07:09
Assigned to:Anonymous» boombatower
Status:active» needs review

Work in progress, major: needs environment setup in order to save results and should port pifr_server table over to maintain log integrity.

AttachmentSize
616600-update.patch 13.66 KB

#2

boombatower - October 29, 2009 - 04:55

Debug included...but seems to work.

and script used:

<?php
if (isset($_GET['restore'])) {
 
header('Content-Type: text/plain');
 
ini_set('display_errors', 1);
 
set_time_limit(0);

  echo
"resetting...\n";

 
db_query('TRUNCATE TABLE {watchdog}');

 
db_query("UPDATE {system}
            SET schema_version = %d
            WHERE name = '%s'"
, 6000, 'pifr');

 
$modules = array(
   
'chart',
   
'views',
   
'tabs',
   
'pifr_server',
   
'pifr_assertion',
   
'pifr_simpletest'
 
);
  foreach (
$modules as $module) {
   
db_query("DELETE FROM {system}
              WHERE name = '%s'"
, $module);
  }

 
$tables = array(
   
'pifr_branch',
   
'pifr_client',
   
'pifr_client_test',
   
'pifr_environment',
   
'pifr_environment_status',
   
'pifr_file',
   
'pifr_log',
   
'pifr_project',
   
'pifr_result',
   
'pifr_result_detail',
   
'pifr_result_detail_assertion',
   
'pifr_test',
   
'pifr_file_old',
   
'pifr_result_old',
   
'pifr_server',
   
'pifr_server_old',
   
'pifr_log_old',
   
'cache_views',
   
'cache_views_data',
   
'views_display',
   
'views_object_cache',
   
'views_view',
  );
 
$ret = array();
  foreach (
$tables as $table) {
    if (
db_table_exists($table)) {
     
db_drop_table($ret, $table);
    }
  }

  echo
"importing t.d.o dataset...\n";

 
$parts = parse_url($db_url['default']);
 
$command = "mysql -u{$parts['user']} -p{$parts['pass']} " . substr($parts['path'], 1);
 
exec($command . ' < /home/boombatower/download/tdo.sql');

//  echo "(temp) slim down dataset...";
//
//  db_query('DELETE FROM {pifr_file} WHERE file_id > 3000');
//  db_query('DELETE FROM {pifr_log} WHERE log_id > 3000');

 
echo "finished...\n";

 
print_r($ret);

  exit;
}
?>

AttachmentSize
616600-update.png 186.86 KB
616600-update.patch 25.46 KB

#3

boombatower - October 29, 2009 - 05:07

Final.

AttachmentSize
616600-update.patch 25.16 KB

#4

boombatower - October 29, 2009 - 05:07
Status:needs review» fixed

Committed.

#5

System Message - November 12, 2009 - 05:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.