Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/20130820.file-mailkey-populate.php
| <?php | <?php | ||||
| echo "Populating Phabricator files with mail keys xactions...\n"; | echo pht('Populating Phabricator files with mail keys xactions...')."\n"; | ||||
| $table = new PhabricatorFile(); | $table = new PhabricatorFile(); | ||||
| $table_name = $table->getTableName(); | $table_name = $table->getTableName(); | ||||
| $conn_w = $table->establishConnection('w'); | $conn_w = $table->establishConnection('w'); | ||||
| $conn_w->openTransaction(); | $conn_w->openTransaction(); | ||||
| $sql = array(); | $sql = array(); | ||||
| Show All 18 Lines | queryfx( | ||||
| storageHandle, dateCreated, dateModified, metadata) VALUES %Q '. | storageHandle, dateCreated, dateModified, metadata) VALUES %Q '. | ||||
| 'ON DUPLICATE KEY UPDATE mailKey = VALUES(mailKey)', | 'ON DUPLICATE KEY UPDATE mailKey = VALUES(mailKey)', | ||||
| $table_name, | $table_name, | ||||
| $chunk); | $chunk); | ||||
| } | } | ||||
| } | } | ||||
| $table->saveTransaction(); | $table->saveTransaction(); | ||||
| echo "Done.\n"; | echo pht('Done.')."\n"; | ||||