2014-03-26 00:09:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$names = array(
|
|
|
|
'CommandBuildStepImplementation',
|
|
|
|
'LeaseHostBuildStepImplementation',
|
|
|
|
'PublishFragmentBuildStepImplementation',
|
|
|
|
'SleepBuildStepImplementation',
|
|
|
|
'UploadArtifactBuildStepImplementation',
|
|
|
|
'WaitForPreviousBuildStepImplementation',
|
|
|
|
);
|
|
|
|
|
|
|
|
$tables = array(
|
|
|
|
id(new HarbormasterBuildStep())->getTableName(),
|
|
|
|
id(new HarbormasterBuildTarget())->getTableName(),
|
|
|
|
);
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Renaming Harbormaster classes...')."\n";
|
2014-03-26 00:09:51 +01:00
|
|
|
|
|
|
|
$conn_w = id(new HarbormasterBuildStep())->establishConnection('w');
|
|
|
|
foreach ($names as $name) {
|
|
|
|
$old = $name;
|
|
|
|
$new = 'Harbormaster'.$name;
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Renaming %s -> %s...', $old, $new)."\n";
|
2014-03-26 00:09:51 +01:00
|
|
|
foreach ($tables as $table) {
|
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'UPDATE %T SET className = %s WHERE className = %s',
|
|
|
|
$table,
|
|
|
|
$new,
|
|
|
|
$old);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|