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

        apps = models.get_apps()
        sequence_list = []

        for app in apps:
            for model in models.get_models(app):
                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:
                    sequence_list.append({'table': f.m2m_db_table(), 'column': None})

        return sequence_list
ensure task clean-action is executed only once
dataset/ETHPy150Open dcramer/django-compositepks/django/db/backends/__init__.py/BaseDatabaseIntrospection.sequence_list--crossover with--dataset/ETHPy150Open pydoit/doit/doit/cmd_clean.py/Clean.clean_tasks