Find out equality of two SQL items.

    See https://docs.djangoproject.com/en/1.8/ref/migration-operations/#runsql.
    Args:
        sqls1, sqls2: SQL items, have the same format as supported by Django's RunSQL operation.
    Returns:
        (bool) `True` if equal, otherwise `False`.

def is_sql_equal(sqls1, sqls2):
    """
    Find out equality of two SQL items.

    See https://docs.djangoproject.com/en/1.8/ref/migration-operations/#runsql.
    Args:
        sqls1, sqls2: SQL items, have the same format as supported by Django's RunSQL operation.
    Returns:
        (bool) `True` if equal, otherwise `False`.
    """
    is_seq1 = isinstance(sqls1, (list, tuple))
    is_seq2 = isinstance(sqls2, (list, tuple))

    if not is_seq1:
        sqls1 = (sqls1,)
    if not is_seq2:
        sqls2 = (sqls2,)

    if len(sqls1) != len(sqls2):
        return False

    for sql1, sql2 in zip(sqls1, sqls2):
        sql1, params1 = _sql_params(sql1)
        sql2, params2 = _sql_params(sql2)
        if sql1 != sql2 or params1 != params2:
            return False
    return True