Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14476023
D8162.id18467.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1000 B
Referenced Files
None
Subscribers
None
D8162.id18467.diff
View Options
Index: resources/sql/patches/20131118.ownerorder.php
===================================================================
--- resources/sql/patches/20131118.ownerorder.php
+++ resources/sql/patches/20131118.ownerorder.php
@@ -3,6 +3,9 @@
$table = new ManiphestTask();
$conn_w = $table->establishConnection('w');
+$user_table = new PhabricatorUser();
+$user_conn = $user_table->establishConnection('r');
+
foreach (new LiskMigrationIterator($table) as $task) {
$id = $task->getID();
@@ -14,13 +17,14 @@
continue;
}
- $owner_handle = id(new PhabricatorHandleQuery())
- ->setViewer(PhabricatorUser::getOmnipotentUser())
- ->withPHIDs(array($owner_phid))
- ->executeOne();
+ $owner_row = queryfx_one(
+ $user_conn,
+ 'SELECT * FROM %T WHERE phid = %s',
+ $user_table->getTableName(),
+ $owner_phid);
- if ($owner_handle) {
- $value = $owner_handle->getName();
+ if ($owner_row) {
+ $value = $owner_row['userName'];
} else {
$value = null;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 10:55 PM (8 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6941304
Default Alt Text
D8162.id18467.diff (1000 B)
Attached To
Mode
D8162: Fix inadvertent forward dependency in task owner migration
Attached
Detach File
Event Timeline
Log In to Comment