[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/resources/sql/autopatches/ -> 20140210.projcfield.1.blurb.php (source)

   1  <?php
   2  
   3  $conn_w = id(new PhabricatorProject())->establishConnection('w');
   4  $table_name = id(new PhabricatorProjectCustomFieldStorage())->getTableName();
   5  
   6  $rows = new LiskRawMigrationIterator($conn_w, 'project_profile');
   7  
   8  echo "Migrating project descriptions to custom storage...\n";
   9  foreach ($rows as $row) {
  10    $phid = $row['projectPHID'];
  11    echo "Migrating {$phid}...\n";
  12  
  13    $desc = $row['blurb'];
  14    if (strlen($desc)) {
  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:project:internal:description'),
  22        $desc);
  23    }
  24  }
  25  
  26  echo "Done.\n";


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