Confirm upgrade path with d.o data

boombatower - July 27, 2009 - 21:46
Project:Project issue file testing
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:boombatower
Status:closed
Description

--

#1

boombatower - July 27, 2009 - 22:10
Assigned to:Anonymous» boombatower

Working on (have been).

#2

boombatower - July 27, 2009 - 22:29

Reset script.

<?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, 'pift');

 
$tables = array(
   
'pift_data',
   
'pift_test',
   
'pift_project',
  );
 
$ret = array();
  foreach (
$tables as $table) {
    if (
db_table_exists($table)) {
     
db_drop_table($ret, $table);
    }
  }

  echo
"importing 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/pift_data.sql');

  echo
"finished...\n";

 
print_r($ret);

  exit;
}
?>

#3

boombatower - July 27, 2009 - 22:37

t.d.o dump script:

<?php
if (isset($_GET['pifr_dump'])) {
 
$result = db_query('SELECT file_id, server_file_id FROM {pifr_file}');
 
$dump = '';
 
$count = 0;
  while (
$file = db_fetch_array($result)) {
   
$dump .= $file['file_id'] . ',' . $file['server_file_id'] . "\n";
   
$count++;
  }
 
file_put_contents('files.dump.txt', $dump);
 
drupal_set_message('Dumped: ' . $count);
  exit;
}
?>

#4

boombatower - July 27, 2009 - 22:58
Status:active» needs review

Cleaned it up a bit and confirmed it works on d.o data...I don't have files tables and such to be 100% sure...not sure how to proceed there as I think we want to be 100%. Regex removes link properly!

AttachmentSize
532678-update.patch 3.5 KB

#5

boombatower - July 27, 2009 - 23:07
Status:needs review» fixed

I'll just plan on deploying to d6.d.o and checking 100% there...as I think was the original plan.

Committed.

#6

System Message - August 10, 2009 - 23:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.