phacility/phabricator · error · Exception
Unknown schema adjustment kind "%s"!
Error message
Unknown schema adjustment kind "%s"!
What it means
The adjust loop hit an adjustment whose `kind` is not one of the handled cases (database, table, column, key). The kind list is produced by the same tree's schema-expectation code, so an unknown value means the running code disagrees with itself: a version mismatch, a partially deployed tree, or a fork that added a kind without a handler.
Source
Thrown at src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:479
} else {
$key_name = qsprintf(
$conn,
'/* NONUNIQUE */ KEY %T',
$adjust['name']);
}
}
queryfx(
$conn,
'ALTER TABLE %T.%T ADD %Q (%LK)',
$adjust['database'],
$adjust['table'],
$key_name,
$adjust['columns']);
}
break;
default:
throw new Exception(
pht('Unknown schema adjustment kind "%s"!', $adjust['kind']));
}
} catch (AphrontQueryException $ex) {
$failed[] = array($adjust, $ex);
}
$bar->update(1);
}
}
$bar->done();
if (!$failed) {
$console->writeOut(
"%s\n",
pht('Completed applying all schema adjustments.'));
$err = 0;
} else {
$table = id(new PhutilConsoleTable())View on GitHub (pinned to 5720a38cfe)
Solutions
- Restore a single coherent version of the tree (clean checkout, redeploy, restart PHP to clear opcache) and re-run `./bin/storage upgrade`.
- Audit local changes for a new adjustment kind lacking a handler; add the handler or drop the change.
- Re-run the upgrade afterwards — adjustments are recomputed from scratch on every run.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// bin/storage upgrade including the adjust phase
} catch (Exception $ex) {
// unknown adjustment kind; halt and reconcile code versions before retrying
fwrite(STDERR, $ex->getMessage()."\n");
exit(1);
} Prevention
- Deploy atomically; restart PHP (clear opcache) after every code update.
- Never mix adjustment producers and the storage workflow across versions.
- Log adjustment failures verbatim; the kind value identifies which side is stale.
When it happens
Trigger: An adjustment record with an unrecognized `kind` reaches the default case of the switch — mixed-version code after a partial deploy, stale opcache, or fork modifications to schema expectations that introduce a new adjustment kind.
Common situations: Deploying half an upgrade (management tool updated, specs not); long-running PHP processes serving cached old code; forks backporting adjustment kinds without the applier.
Related errors
- Unsupported character set "%s".
- Unsupported collation set "%s".
- Unknown condition "%s"!
- Specify the dumpfile to read with "--input", or use "--live"
- Specify namespace to rename from with %s.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/03231794fce57c23.
Report an issue: GitHub.