          loader = MigrationLoader(connection=None)
          loader.check_consistent_history(connection)
          recorder = MigrationRecorder(connection)
          recorder.record_applied('migrations', '0002_second')
          msg = "Migration migrations.0002_second is applied before its dependency migrations.0001_initial"
          with self.assertRaisesMessage(InconsistentMigrationHistory, msg):
              loader.check_consistent_history(connection)
  
      @override_settings(
          MIGRATION_MODULES={'migrations': 'migrations.test_migrations_squashed_extra'},
 
</s> remove                         "Migration {}.{} is applied before its dependency {}.{}".format(
 </s> add                         "Migration {}.{} is applied before its dependency "
                        "{}.{} on database '{}'.".format(
        msg = (
            "Migration migrations.0002_second is applied before its dependency "
            "migrations.0001_initial on database 'default'."
        )
          loader = MigrationLoader(connection=None)
          loader.check_consistent_history(connection)
          recorder = MigrationRecorder(connection)
          recorder.record_applied('migrations', '0002_second')
        msg = (
            "Migration migrations.0002_second is applied before its dependency "
            "migrations.0001_initial on database 'default'."
        )
          with self.assertRaisesMessage(InconsistentMigrationHistory, msg):
              loader.check_consistent_history(connection)
  
      @override_settings(
          MIGRATION_MODULES={'migrations': 'migrations.test_migrations_squashed_extra'},
keep keep keep keep replace keep keep keep keep keep
 Fixed #27089 -- Added database alias to InconsistentMigrationHistory message. 
tests/migrations/test_loader.py