Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14002383
D8152.id18441.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
878 B
Referenced Files
None
Subscribers
None
D8152.id18441.diff
View Options
diff --git a/resources/sql/patches/20130219.commitsummarymig.php b/resources/sql/patches/20130219.commitsummarymig.php
--- a/resources/sql/patches/20130219.commitsummarymig.php
+++ b/resources/sql/patches/20130219.commitsummarymig.php
@@ -2,7 +2,9 @@
echo "Backfilling commit summaries...\n";
-$commits = new LiskMigrationIterator(new PhabricatorRepositoryCommit());
+$table = new PhabricatorRepositoryCommit();
+$conn_w = $table->establishConnection('w');
+$commits = new LiskMigrationIterator($table);
foreach ($commits as $commit) {
echo 'Filling Commit #'.$commit->getID()."\n";
@@ -18,8 +20,12 @@
continue;
}
- $commit->setSummary($data->getSummary());
- $commit->save();
+ queryfx(
+ $conn_w,
+ 'UPDATE %T SET summary = %s WHERE id = %d',
+ $commit->getTableName(),
+ $data->getSummary(),
+ $commit->getID());
}
echo "Done.\n";
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 26, 6:31 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721268
Default Alt Text
D8152.id18441.diff (878 B)
Attached To
Mode
D8152: Fix accidental forward dependency in old commit summary migration
Attached
Detach File
Event Timeline
Log In to Comment