[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/resources/sql/patches/ -> 20130915.maniphestmigrate.php (source)

   1  <?php
   2  
   3  $conn_w = id(new ManiphestTask())->establishConnection('w');
   4  $table_name = id(new ManiphestCustomFieldStorage())->getTableName();
   5  
   6  $rows = new LiskRawMigrationIterator($conn_w, 'maniphest_taskauxiliarystorage');
   7  
   8  echo "Migrating custom storage for Maniphest fields...\n";
   9  foreach ($rows as $row) {
  10    $phid = $row['taskPHID'];
  11    $name = $row['name'];
  12  
  13    echo "Migrating {$phid} / {$name}...\n";
  14  
  15    queryfx(
  16      $conn_w,
  17      'INSERT IGNORE INTO %T (objectPHID, fieldIndex, fieldValue)
  18        VALUES (%s, %s, %s)',
  19      $table_name,
  20      $phid,
  21      PhabricatorHash::digestForIndex('std:maniphest:'.$name),
  22      $row['value']);
  23  }
  24  
  25  echo "Done.\n";


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1