query()` returned. {@see Schema::delta()} looks for the table * itself and throws this. It carries FACTS — table names and the database's own message, as they * are — because a migration can run before WordPress will load a translation; the admin notice * turns them into a sentence, and escapes them, at the point where it prints. */ final class MigrationFailed extends RuntimeException { /** * @param string[] $tables The tables that do not exist. * @param string $reason What the database said, or '' if it said nothing. */ public function __construct( private readonly array $tables, private readonly string $reason ) { parent::__construct( 'Could not create ' . implode( ', ', $tables ) . ( '' === $reason ? '.' : ': ' . $reason ) ); } /** * @return string[] */ public function tables(): array { return $this->tables; } public function reason(): string { return $this->reason; } }