Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/autopatches/20141218.maniphestcctxn.php
| <?php | <?php | ||||
| $table = new ManiphestTransaction(); | $table = new ManiphestTransaction(); | ||||
| $conn_w = $table->establishConnection('w'); | $conn_w = $table->establishConnection('w'); | ||||
| echo "Converting Maniphest CC transactions to modern SUBSCRIBER ". | echo pht( | ||||
| "transactions...\n"; | "Converting Maniphest CC transactions to modern ". | ||||
| "subscriber transactions...\n"); | |||||
| foreach (new LiskMigrationIterator($table) as $txn) { | foreach (new LiskMigrationIterator($table) as $txn) { | ||||
| // ManiphestTransaction::TYPE_CCS | // ManiphestTransaction::TYPE_CCS | ||||
| if ($txn->getTransactionType() == 'ccs') { | if ($txn->getTransactionType() == 'ccs') { | ||||
| queryfx( | queryfx( | ||||
| $conn_w, | $conn_w, | ||||
| 'UPDATE %T SET transactionType = %s WHERE id = %d', | 'UPDATE %T SET transactionType = %s WHERE id = %d', | ||||
| $table->getTableName(), | $table->getTableName(), | ||||
| PhabricatorTransactions::TYPE_SUBSCRIBERS, | PhabricatorTransactions::TYPE_SUBSCRIBERS, | ||||
| $txn->getID()); | $txn->getID()); | ||||
| } | } | ||||
| } | } | ||||
| echo "Done.\n"; | echo pht('Done.')."\n"; | ||||