mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
e492c717c6
Summary: Ref T13077. Prepares for modern API access to document history using standard "v3" APIs. Test Plan: Ran migration, verified PHIDs appeared in the database. Created/edited a document, got even more PHIDs in the database. Maniphest Tasks: T13077 Differential Revision: https://secure.phabricator.com/D19092
17 lines
334 B
PHP
17 lines
334 B
PHP
<?php
|
|
|
|
$table = new PhrictionContent();
|
|
$conn = $table->establishConnection('w');
|
|
|
|
foreach (new LiskMigrationIterator($table) as $row) {
|
|
if (strlen($row->getPHID())) {
|
|
continue;
|
|
}
|
|
|
|
queryfx(
|
|
$conn,
|
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
$table->generatePHID(),
|
|
$row->getID());
|
|
}
|