mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 02:42:40 +01:00
9141da84c8
Summary: database migration + drop old view code. Fixes T5604. Test Plan: grepped src/ for TYPE_CCS (no hits); viewed some tasks with old cc transactions and noted they still rendered correctly post data conversion Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T5604 Differential Revision: https://secure.phabricator.com/D11015
20 lines
524 B
PHP
20 lines
524 B
PHP
<?php
|
|
|
|
$table = new ManiphestTransaction();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
echo "Converting Maniphest CC transactions to modern SUBSCRIBER ".
|
|
"transactions...\n";
|
|
foreach (new LiskMigrationIterator($table) as $txn) {
|
|
// ManiphestTransaction::TYPE_CCS
|
|
if ($txn->getTransactionType() == 'ccs') {
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET transactionType = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
PhabricatorTransactions::TYPE_SUBSCRIBERS,
|
|
$txn->getID());
|
|
}
|
|
}
|
|
|
|
echo "Done.\n";
|