Adds a foreign key constraint.

        Name is inferred from the local columns.

        :param foreign_table: Table instance or table name
        :type foreign_table: Table or str

        :type local_columns: list

        :type foreign_columns: list

        :type options: dict

        :type constraint_name: str or None

        :rtype: Table

def add_foreign_key_constraint(
        self,
        foreign_table,
        local_columns,
        foreign_columns,
        options=None,
        constraint_name=None,
    ):
        """
        Adds a foreign key constraint.

        Name is inferred from the local columns.

        :param foreign_table: Table instance or table name
        :type foreign_table: Table or str

        :type local_columns: list

        :type foreign_columns: list

        :type options: dict

        :type constraint_name: str or None

        :rtype: Table
        """
        if not constraint_name:
            constraint_name = self._generate_identifier_name(
                [self.get_name()] + local_columns,
                "fk",
                self._get_max_identifier_length(),
            )

        return self.add_named_foreign_key_constraint(
            constraint_name, foreign_table, local_columns, foreign_columns, options
        )