phacility/phabricator · error · Exception

Unsupported collation set "%s".

Error message

Unsupported collation set "%s".

What it means

During the schema-adjustment phase of `bin/storage upgrade`, a column adjustment carries a collation other than binary, utf8_general_ci, utf8mb4_bin or utf8mb4_unicode_ci — the only values the workflow can render into `COLLATE`. The exception signals that schema-expectation code and the adjustment applier disagree, which in practice means local modifications or a mixed-version tree.

Source

Thrown at src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:391

                          'Unsupported character set "%s".',
                          $adjust['charset']));
                  }

                  switch ($adjust['collation']) {
                    case 'binary':
                      $collation_value = qsprintf($conn, 'binary');
                      break;
                    case 'utf8_general_ci':
                      $collation_value = qsprintf($conn, 'utf8_general_ci');
                      break;
                    case 'utf8mb4_bin':
                      $collation_value = qsprintf($conn, 'utf8mb4_bin');
                      break;
                    case 'utf8mb4_unicode_ci':
                      $collation_value = qsprintf($conn, 'utf8mb4_unicode_ci');
                      break;
                    default:
                      throw new Exception(
                        pht(
                          'Unsupported collation set "%s".',
                          $adjust['collation']));
                  }

                  $parts[] = qsprintf(
                    $conn,
                    'CHARACTER SET %Q COLLATE %Q',
                    $charset_value,
                    $collation_value);
                }

                if ($parts) {
                  $parts = qsprintf($conn, '%LJ', $parts);
                } else {
                  $parts = qsprintf($conn, '');
                }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Restore one coherent code version (clean checkout, redeploy, restart PHP to clear opcache) and re-run `./bin/storage upgrade`.
  2. Remove local schema-spec changes that produce collations outside the supported set.
  3. If the fork needs the collation, extend the switch together with the spec change in the same commit.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  // bin/storage upgrade including the adjust phase
} catch (Exception $ex) {
  // adjustment invariant broke; do not retry until code versions are coherent
  fwrite(STDERR, $ex->getMessage()."\n");
  exit(1);
}

Prevention

When it happens

Trigger: An adjustment record with an unrecognized collation reaches the switch: fork-modified schema specs, or storage-management code and schema-spec code from different versions (stale opcache, partial deploy).

Common situations: Half-updated checkouts where the workflow file is older than the spec code; forks backporting utf8mb4 work; opcache serving mixed file versions.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/f331d7496442ff73. Report an issue: GitHub.