Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13995385
D8162.id18465.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
991 B
Referenced Files
None
Subscribers
None
D8162.id18465.diff
View Options
diff --git a/resources/sql/patches/20131118.ownerorder.php b/resources/sql/patches/20131118.ownerorder.php
--- a/resources/sql/patches/20131118.ownerorder.php
+++ b/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
Thu, Oct 24, 12:30 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728550
Default Alt Text
D8162.id18465.diff (991 B)
Attached To
Mode
D8162: Fix inadvertent forward dependency in task owner migration
Attached
Detach File
Event Timeline
Log In to Comment