mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Shorten extremely long credential names when migrating them
Summary: Fixes T4183. If you have too many repositories sharing the same credential and MySQL is in strict mode, we'll fail a query when trying to write a credential with a name longer than 255 characters. Instead, shorten the variable-length part to 128 characters. Test Plan: Wiped credentials column and successfully re-ran migration with `storage upgrade --force --apply phabricator:20131121.repocredentials.2.mig.php` Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4183 Differential Revision: https://secure.phabricator.com/D7677
This commit is contained in:
parent
d59722321f
commit
95c2b50974
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ foreach ($map as $credential_type => $credential_usernames) {
|
||||||
$callsigns = mpull($repositories, 'getCallsign');
|
$callsigns = mpull($repositories, 'getCallsign');
|
||||||
$name = pht(
|
$name = pht(
|
||||||
'Migrated Repository Credential (%s)',
|
'Migrated Repository Credential (%s)',
|
||||||
implode(', ', $callsigns));
|
phutil_utf8_shorten(implode(', ', $callsigns), 128));
|
||||||
|
|
||||||
echo "Creating: {$name}...\n";
|
echo "Creating: {$name}...\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue