Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13972631
D8162.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.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
Fri, Oct 18, 8:10 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712546
Default Alt Text
D8162.diff (1000 B)
Attached To
Mode
D8162: Fix inadvertent forward dependency in task owner migration
Attached
Detach File
Event Timeline
Log In to Comment