'Return a set of (app, name) of applied migrations.'

def applied_migrations(self):

    if self.has_table():
        return {tuple(x) for x in self.migration_qs.values_list('app', 'name')}
    else:
        return set()
