mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-12 00:26:13 +01:00
cec8d10731
Summary: Ref T1049. For consistency, rename these to "Harbormaster...". Test Plan: Ran migration, ran builds, everything still works fine. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T1049 Differential Revision: https://secure.phabricator.com/D8602
35 lines
802 B
PHP
35 lines
802 B
PHP
<?php
|
|
|
|
$names = array(
|
|
'CommandBuildStepImplementation',
|
|
'LeaseHostBuildStepImplementation',
|
|
'PublishFragmentBuildStepImplementation',
|
|
'SleepBuildStepImplementation',
|
|
'UploadArtifactBuildStepImplementation',
|
|
'WaitForPreviousBuildStepImplementation',
|
|
);
|
|
|
|
$tables = array(
|
|
id(new HarbormasterBuildStep())->getTableName(),
|
|
id(new HarbormasterBuildTarget())->getTableName(),
|
|
);
|
|
|
|
echo "Renaming Harbormaster classes...\n";
|
|
|
|
$conn_w = id(new HarbormasterBuildStep())->establishConnection('w');
|
|
foreach ($names as $name) {
|
|
$old = $name;
|
|
$new = 'Harbormaster'.$name;
|
|
|
|
echo "Renaming {$old} -> {$new}...\n";
|
|
foreach ($tables as $table) {
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET className = %s WHERE className = %s',
|
|
$table,
|
|
$new,
|
|
$old);
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|