[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 $project_table = new PhabricatorProject(); 4 $table_name = $project_table->getTableName(); 5 $conn_w = $project_table->establishConnection('w'); 6 $slug_table_name = id(new PhabricatorProjectSlug())->getTableName(); 7 $time = time(); 8 9 echo "Migrating project phriction slugs...\n"; 10 foreach (new LiskMigrationIterator($project_table) as $project) { 11 $id = $project->getID(); 12 13 echo "Migrating project {$id}...\n"; 14 $phriction_slug = rtrim($project->getPhrictionSlug(), '/'); 15 $slug = id(new PhabricatorProjectSlug()) 16 ->loadOneWhere('slug = %s', $phriction_slug); 17 if ($slug) { 18 echo "Already migrated {$id}... Continuing.\n"; 19 continue; 20 } 21 queryfx( 22 $conn_w, 23 'INSERT INTO %T (projectPHID, slug, dateCreated, dateModified) '. 24 'VALUES (%s, %s, %d, %d)', 25 $slug_table_name, 26 $project->getPHID(), 27 $phriction_slug, 28 $time, 29 $time); 30 echo "Migrated {$id}.\n"; 31 } 32 33 echo "Done.\n";
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |