'#22275 - A migration with circular FK dependency does not try
to create unique together constraint and indexes before creating all
required fields first.'

def test_same_app_circular_fk_dependency_with_unique_together_and_indexes(self):

    changes = self.get_changes([], [self.knight, self.rabbit])
    self.assertNumberMigrations(changes, 'eggs', 1)
    self.assertOperationTypes(changes, 'eggs', 0, ['CreateModel', 'CreateModel', 'AddIndex', 'AlterUniqueTogether'])
    self.assertNotIn('unique_together', changes['eggs'][0].operations[0].options)
    self.assertNotIn('unique_together', changes['eggs'][0].operations[1].options)
    self.assertMigrationDependencies(changes, 'eggs', 0, [])
