old_contents: # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
  # MIT License. See license.txt
  
  from __future__ import unicode_literals
  import frappe
  
  
  def execute():
  	frappe.db.sql(
  		"""INSERT INTO `tabData Import Legacy` SELECT * FROM `tabData Import`"""
  	)
  	frappe.db.commit()
  	frappe.db.sql("DROP TABLE IF EXISTS `tabData Import`")
  	frappe.reload_doc("core", "doctype", "data_import")
  	frappe.get_doc("DocType", "Data Import").on_update()
  
new_contents: # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
  # MIT License. See license.txt
  
  from __future__ import unicode_literals
  import frappe
  
  
  def execute():
  	frappe.rename_doc('DocType', 'Data Import', 'Data Import Legacy')
  	frappe.db.commit()
  	frappe.db.sql("DROP TABLE IF EXISTS `tabData Import`")
  	frappe.reload_doc("core", "doctype", "data_import")
  	frappe.get_doc("DocType", "Data Import").on_update()
  
subject: Use rename doc instead of manually moving the data