protected function createUniqueKeyConstraint(
        $constraintOptions,
        string $fieldName,
        string $tableName
    ): Constraint\UniqueKey {
        $constraintName = is_string($constraintOptions) ? $constraintOptions : "UniqueKey_{$tableName}_{$fieldName}";

        return new Constraint\UniqueKey([$fieldName], $constraintName);
    }