blob: 73f08ac68a3c25b7592274be58f90a087ada62dc [file] [log] [blame]
Rushabh Mehtaad45e312013-11-20 12:59:58 +05301# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
Rushabh Mehtae67d1fb2013-08-05 14:59:54 +05302# License: GNU General Public License v3. See license.txt
3
Rushabh Mehta5eb37642013-02-14 17:34:51 +05304import webnotes
5
6def execute():
7 webnotes.reload_doc("core", "doctype", "event")
8
9 webnotes.conn.sql("""update tabEvent set subject=description""")
10
11 webnotes.conn.sql("""update tabEvent set description = concat(description, "\n", notes)
12 where ifnull(notes,"") != "" """)
13
14 webnotes.conn.sql("""update tabEvent set starts_on = timestamp(event_date, event_hour)""")
15
16 webnotes.conn.sql("""update tabEvent set ends_on = timestampadd(hour, 1, starts_on)""")
17