Adds a foreign key constraint.

        :param constraint: The constraint to add
        :type constraint: ForeignKeyConstraint

        :rtype: Table

def _add_foreign_key_constraint(self, constraint):
        """
        Adds a foreign key constraint.

        :param constraint: The constraint to add
        :type constraint: ForeignKeyConstraint

        :rtype: Table
        """
        constraint.set_local_table(self)

        if constraint.get_name():
            name = constraint.get_name()
        else:
            name = self._generate_identifier_name(
                [self.get_name()] + constraint.get_local_columns(),
                "fk",
                self._get_max_identifier_length(),
            )

        name = self._normalize_identifier(name)

        self._fk_constraints[name] = constraint

        # Add an explicit index on the foreign key columns.
        # If there is already an index that fulfils this requirements drop the request.
        # In the case of __init__ calling this method during hydration from schema-details
        # all the explicitly added indexes lead to duplicates.
        # This creates computation overhead in this case, however no duplicate indexes
        # are ever added (based on columns).
        index_name = self._generate_identifier_name(
            [self.get_name()] + constraint.get_columns(),
            "idx",
            self._get_max_identifier_length(),
        )
        index_candidate = self._create_index(
            constraint.get_columns(), index_name, False, False
        )

        for existing_index in self._indexes.values():
            if index_candidate.is_fullfilled_by(existing_index):
                return

        # self._add_index(index_candidate)
        # self._implicit_indexes[self._normalize_identifier(index_name)] = index_candidate

        return self