mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
23 lines
545 B
PHP
23 lines
545 B
PHP
|
<?php
|
||
|
|
||
|
$table = new PhabricatorOwnersPath();
|
||
|
$conn = $table->establishConnection('w');
|
||
|
|
||
|
$seen = array();
|
||
|
foreach (new LiskMigrationIterator($table) as $path) {
|
||
|
$package_id = $path->getPackageID();
|
||
|
$repository_phid = $path->getRepositoryPHID();
|
||
|
$path_index = $path->getPathIndex();
|
||
|
|
||
|
if (!isset($seen[$package_id][$repository_phid][$path_index])) {
|
||
|
$seen[$package_id][$repository_phid][$path_index] = true;
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
queryfx(
|
||
|
$conn,
|
||
|
'DELETE FROM %T WHERE id = %d',
|
||
|
$table->getTableName(),
|
||
|
$path->getID());
|
||
|
}
|