brotherton-erpnext/erpnext/patches/june_2012/series_unique_patch.py
2012-06-14 18:28:29 +05:30

6 lines
201 B
Python

def execute():
"""add unique constraint to series table's name column"""
import webnotes
webnotes.conn.commit()
webnotes.conn.sql("alter table `tabSeries` add unique (name)")
webnotes.conn.begin()