Page MenuHomePhorge

20161213.diff.01.hunks.php
No OneTemporary

Size
888 B
Referenced Files
None
Subscribers
None

20161213.diff.01.hunks.php

<?php
$conn = id(new DifferentialRevision())->establishConnection('w');
$src_table = 'differential_hunk';
$dst_table = 'differential_hunk_modern';
echo tsprintf(
"%s\n",
pht('Migrating old hunks...'));
foreach (new LiskRawMigrationIterator($conn, $src_table) as $row) {
queryfx(
$conn,
'INSERT INTO %T
(changesetID, oldOffset, oldLen, newOffset, newLen,
dataType, dataEncoding, dataFormat, data,
dateCreated, dateModified)
VALUES
(%d, %d, %d, %d, %d,
%s, %s, %s, %s,
%d, %d)',
$dst_table,
$row['changesetID'],
$row['oldOffset'],
$row['oldLen'],
$row['newOffset'],
$row['newLen'],
DifferentialModernHunk::DATATYPE_TEXT,
'utf8',
DifferentialModernHunk::DATAFORMAT_RAW,
$row['changes'],
$row['dateCreated'],
$row['dateModified']);
}
echo tsprintf(
"%s\n",
pht('Done.'));

File Metadata

Mime Type
text/x-php
Expires
Wed, Jun 18, 6:56 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
238272
Default Alt Text
20161213.diff.01.hunks.php (888 B)

Event Timeline