Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75327355
20140323.harbor.1.renames.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 1, 15:48
Size
802 B
Mime Type
text/x-php
Expires
Sat, Aug 3, 15:48 (2 d)
Engine
blob
Format
Raw Data
Handle
19526044
Attached To
rPH Phabricator
20140323.harbor.1.renames.php
View Options
<?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
"
;
Event Timeline
Log In to Comment