2014-01-09 19:56:34 +01:00
|
|
|
<?php
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Adding names to Drydock blueprints.')."\n";
|
2014-01-09 19:56:34 +01:00
|
|
|
|
|
|
|
$table = new DrydockBlueprint();
|
|
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
$iterator = new LiskMigrationIterator($table);
|
|
|
|
foreach ($iterator as $blueprint) {
|
|
|
|
$id = $blueprint->getID();
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Populating blueprint %d...', $id)."\n";
|
2014-01-09 19:56:34 +01:00
|
|
|
|
|
|
|
if (!strlen($blueprint->getBlueprintName())) {
|
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'UPDATE %T SET blueprintName = %s WHERE id = %d',
|
|
|
|
$table->getTableName(),
|
|
|
|
pht('Blueprint %s', $id),
|
|
|
|
$id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|