# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt

from __future__ import unicode_literals
import frappe

from frappe.model.document import Document

class DefaultValue(Document):
	pass

def on_doctype_update():
	"""Create indexes for `tabDefaultValue` on `(parent, defkey)`"""
	frappe.db.commit()
	frappe.db.add_index(doctype='DefaultValue',
		fields=['parent', 'defkey'],
		index_name='defaultvalue_parent_defkey_index')

	frappe.db.add_index(doctype='DefaultValue',
		fields=['parent', 'parenttype'],
		index_name='defaultvalue_parent_parenttype_index')
