Rushabh Mehta | ad45e31 | 2013-11-20 12:59:58 +0530 | [diff] [blame] | 1 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors |
Rushabh Mehta | e67d1fb | 2013-08-05 14:59:54 +0530 | [diff] [blame] | 2 | # License: GNU General Public License v3. See license.txt |
| 3 | |
Rushabh Mehta | 5eb3764 | 2013-02-14 17:34:51 +0530 | [diff] [blame] | 4 | import webnotes |
| 5 | |
| 6 | def 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 | |