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
--
| Project: | Project issue file testing |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | boombatower |
| Status: | closed |
--
#1
Working on (have been).
#2
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
t.d.o dump script:
<?phpif (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
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!
#5
I'll just plan on deploying to d6.d.o and checking 100% there...as I think was the original plan.
Committed.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.