                      if parent in self.replacements:
                          if all(m in applied for m in self.replacements[parent].replaces):
                              continue
                      raise InconsistentMigrationHistory(
                          "Migration {}.{} is applied before its dependency {}.{}".format(
                              migration[0], migration[1], parent[0], parent[1],
                          )
                      )
  
      def detect_conflicts(self):
 
</s> remove         msg = "Migration migrations.0002_second is applied before its dependency migrations.0001_initial"
 </s> add         msg = (
            "Migration migrations.0002_second is applied before its dependency "
            "migrations.0001_initial on database 'default'."
        )
                        "Migration {}.{} is applied before its dependency "
                        "{}.{} on database '{}'.".format(
                      if parent in self.replacements:
                          if all(m in applied for m in self.replacements[parent].replaces):
                              continue
                      raise InconsistentMigrationHistory(
                        "Migration {}.{} is applied before its dependency "
                        "{}.{} on database '{}'.".format(
                              migration[0], migration[1], parent[0], parent[1],
                          )
                      )
  
      def detect_conflicts(self):
keep keep keep keep replace keep keep keep keep keep
 Fixed #27089 -- Added database alias to InconsistentMigrationHistory message. 
django/db/migrations/loader.py