1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00
phorge-phorge/resources/sql/patches/20121209.xmacromigrate.php

19 lines
373 B
PHP
Raw Normal View History

<?php
echo "Giving image macros PHIDs";
foreach (new LiskMigrationIterator(new PhabricatorFileImageMacro()) as $macro) {
if ($macro->getPHID()) {
continue;
}
echo ".";
queryfx(
$macro->establishConnection('r'),
'UPDATE %T SET phid = %s WHERE id = %d',
$macro->getTableName(),
$macro->generatePHID(),
$macro->getID());
}
echo "\nDone.\n";