              output.extend(f.post_create_sql(style, model._meta.db_table))
  
      # Find custom SQL, if it's available.
      backend_name = connection.settings_dict['ENGINE'].split('.')[-1]
      sql_files = [os.path.join(app_dir, "%s.%s.sql" % (opts.object_name.lower(), backend_name)),
                   os.path.join(app_dir, "%s.sql" % opts.object_name.lower())]
      for sql_file in sql_files:
          if os.path.exists(sql_file):
              with codecs.open(sql_file, 'U', encoding=settings.FILE_CHARSET) as fp:
                  # Some backends can't execute more than one SQL statement at a time,
                  # so split into separate statements.
 
</s> remove         self.name = '%s:%s' % (self.opts.app_label, self.opts.module_name)
        self.var_name = self.opts.object_name.lower()
 </s> add         self.name = '%s:%s' % (self.opts.app_label, self.opts.model_name)
        self.var_name = self.opts.model_name </s> remove             model_name = model._meta.object_name.lower()
 </s> add             model_name = model._meta.model_name </s> remove                                     rel_to._meta.module_name),
 </s> add                                     rel_to._meta.model_name), </s> remove             to_name = to._meta.object_name.lower()
 </s> add             to_name = to._meta.model_name </s> remove             "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.module_name),
 </s> add             "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.model_name),
    sql_files = [os.path.join(app_dir, "%s.%s.sql" % (opts.model_name, backend_name)),
                 os.path.join(app_dir, "%s.sql" % opts.model_name)]
              output.extend(f.post_create_sql(style, model._meta.db_table))
  
      # Find custom SQL, if it's available.
      backend_name = connection.settings_dict['ENGINE'].split('.')[-1]
    sql_files = [os.path.join(app_dir, "%s.%s.sql" % (opts.model_name, backend_name)),
                 os.path.join(app_dir, "%s.sql" % opts.model_name)]
    sql_files = [os.path.join(app_dir, "%s.%s.sql" % (opts.model_name, backend_name)),
                 os.path.join(app_dir, "%s.sql" % opts.model_name)]
      for sql_file in sql_files:
          if os.path.exists(sql_file):
              with codecs.open(sql_file, 'U', encoding=settings.FILE_CHARSET) as fp:
                  # Some backends can't execute more than one SQL statement at a time,
                  # so split into separate statements.
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`. 
django/core/management/sql.py