2014-02-10 23:31:57 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$conn_w = id(new PhabricatorProject())->establishConnection('w');
|
|
|
|
$table_name = id(new PhabricatorProjectCustomFieldStorage())->getTableName();
|
|
|
|
|
|
|
|
$rows = new LiskRawMigrationIterator($conn_w, 'project_profile');
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating project descriptions to custom storage...')."\n";
|
2014-02-10 23:31:57 +01:00
|
|
|
foreach ($rows as $row) {
|
|
|
|
$phid = $row['projectPHID'];
|
|
|
|
|
|
|
|
$desc = $row['blurb'];
|
|
|
|
if (strlen($desc)) {
|
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
|
|
|
|
VALUES (%s, %s, %s)',
|
|
|
|
$table_name,
|
|
|
|
$phid,
|
|
|
|
PhabricatorHash::digestForIndex('std:project:internal:description'),
|
|
|
|
$desc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|