def sequence_list(self):
        from django.db import models, router

        apps = models.get_apps()
        sequence_list = []

        for app in apps:
            for model in models.get_models(app):
                if not model._meta.managed:
                    continue
                if not router.allow_syncdb(self.connection.alias, model):
                    continue
                for f in model._meta.local_fields:
                    if isinstance(f, models.AutoField):
                        sequence_list.append({'table': model._meta.db_table, 'column': f.column})
                        break # Only one AutoField is allowed per model, so don't bother continuing.

                for f in model._meta.local_many_to_many:
                    # If this is an m2m using an intermediate table,
                    # we don't need to reset the sequence.
                    if f.rel.through is None:
                        sequence_list.append({'table': f.m2m_db_table(), 'column': None})

        return sequence_list
Harness to test if the FrameSet.__hash__ call works properly.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/db/backends/__init__.py/BaseDatabaseIntrospection.sequence_list--crossover with--dataset/ETHPy150Open sqlboy/fileseq/test/run.py/TestFrameSet._check___hash__