protected function buildIndexName(string $tableName, array $indexDef): string {
        $indexDef += ['type' => Db::INDEX_IX, 'suffix' => ''];

        $type = $indexDef['type'];

        if ($type === Db::INDEX_PK) {
            return 'primary';
        }
        $px = self::val($type, [Db::INDEX_IX => 'ix_', Db::INDEX_UNIQUE => 'ux_'], 'ix_');
        $sx = $indexDef['suffix'];
        $result = $px.$tableName.'_'.($sx ?: implode('', $indexDef['columns']));
        return $result;
    }