'Returns the fully-formatted filename of what a new migration \'name\' would be'

def next_filename(self, name):

    highest_number = 0
    for migration in self:
        try:
            number = int(migration.name().split('_')[0])
            highest_number = max(highest_number, number)
        except ValueError:
            pass
    return ('%04i_%s.py' % ((highest_number + 1), name))
