mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-12 00:26:13 +01:00
24 lines
433 B
PHP
24 lines
433 B
PHP
|
<?php
|
||
|
|
||
|
echo "Giving pholio images PHIDs";
|
||
|
$table = new PholioImage();
|
||
|
$table->openTransaction();
|
||
|
|
||
|
foreach (new LiskMigrationIterator($table) as $image) {
|
||
|
if ($image->getPHID()) {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
echo ".";
|
||
|
|
||
|
queryfx(
|
||
|
$image->establishConnection('w'),
|
||
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
||
|
$image->getTableName(),
|
||
|
$image->generatePHID(),
|
||
|
$image->getID());
|
||
|
}
|
||
|
|
||
|
$table->saveTransaction();
|
||
|
echo "\nDone.\n";
|