freakboy3742/django — pull request #2 by joshourisman (2012-09-18 21:06:36+00:00)
Title: BaseDatabaseIntrospection.sequence_list() lists invalid sequences if there are swappable models.

If a model, such as auth.User, has been swapped, sequence_list() would still list sequences for it, because it only paid attention to if a model had been defined or not. As a result, sqlflush generates SQL that failed to execute against a database generated by syncdb which, among other things, means that tests cannot be run because the test runner always runs sqlflush after syncdb. Having sequence_list() compare models to the list of existing tables fixes this.