add unique constraint to tabSeries name column

This commit is contained in:
Anand Doshi 2012-06-14 18:28:29 +05:30
parent 7d1e8f218b
commit 3878b2a1ac
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,6 @@
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()

View File

@ -437,4 +437,9 @@ patch_list = [
'patch_file': 'support_ticket_autoreply',
'description': 'New Send Autoreply checkbox in Email Settings'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'series_unique_patch',
'description': "add unique constraint to series table's name column"
},
]