refactored patches, bug fix for assign_to
diff --git a/erpnext/patches/jan_mar_2012/latest/cleanups.py b/erpnext/patches/jan_mar_2012/latest/cleanups.py
new file mode 100644
index 0000000..44d24c0
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/latest/cleanups.py
@@ -0,0 +1,33 @@
+import webnotes
+
+def execute():
+	from webnotes.model import delete_doc
+	delete_doc("DocType", "SSO Control")
+	delete_doc("DocType", "WN ERP Client Control")
+	delete_doc("DocType", "Production Tips Common")
+	delete_doc("DocType", "DocTrigger")
+	delete_doc("Page", "Setup Wizard")
+	
+	# cleanup control panel
+	delete_doc("DocType", "Control Panel")
+	reload_doc("core", "doctype", "control_panel")
+
+	# cleanup page
+	delete_doc("DocType", "Page")
+	reload_doc("core", "doctype", "page")
+	
+	webnotes.conn.sql("""delete from tabSingles
+		where field like 'startup_%' and doctype='Control Panel'""")
+		
+	webnotes.conn.commit()
+
+	# DDLs
+	# -------------------
+	
+	webnotes.conn.sql("drop table if exists tabDocTrigger")	
+
+	try: webnotes.conn.sql("""alter table `tabFile Data` drop column blob_content""")
+	except: pass
+		
+	webnotes.conn.sql("""alter table __PatchLog engine=InnoDB""")
+	
\ No newline at end of file
diff --git a/erpnext/patches/jan_mar_2012/latest/login.py b/erpnext/patches/jan_mar_2012/latest/login.py
index fcf72dc..97cd323 100644
--- a/erpnext/patches/jan_mar_2012/latest/login.py
+++ b/erpnext/patches/jan_mar_2012/latest/login.py
@@ -5,28 +5,7 @@
 def execute():
 	add_default_home_page()
 	reload_doc('setup','doctype','manage_account')
-	webnotes.conn.commit()
-	webnotes.conn.sql("drop table if exists tabDocTrigger")
-	cleanup()
-	
-def cleanup():
-	webnotes.conn.begin()
-	from webnotes.model import delete_doc
-	delete_doc("DocType", "SSO Control")
-	delete_doc("DocType", "WN ERP Client Control")
-	delete_doc("DocType", "Production Tips Common")
-	delete_doc("DocType", "DocTrigger")
 
-	# cleanup control panel
-	delete_doc("DocType", "Control Panel")
-	reload_doc("core", "doctype", "control_panel")
-
-	# cleanup page
-	delete_doc("DocType", "Page")
-	reload_doc("core", "doctype", "page")
-	
-	webnotes.conn.sql("""delete from tabSingles
-		where field like 'startup_%' and doctype='Control Panel'""")
 	
 def add_default_home_page():
 	if not webnotes.conn.sql("""select name from `tabDefault Home Page`
diff --git a/erpnext/patches/jan_mar_2012/latest/website.py b/erpnext/patches/jan_mar_2012/latest/website.py
index 1b4754a..a6f1310 100644
--- a/erpnext/patches/jan_mar_2012/latest/website.py
+++ b/erpnext/patches/jan_mar_2012/latest/website.py
@@ -5,8 +5,6 @@
 
 def execute():	
 	add_website_manager()
-	cleanup_file_data()
-	update_patch_log()
 	from webnotes.modules import reload_doc
 	from webnotes.model import delete_doc
 	
@@ -50,16 +48,3 @@
 			d.parent = i[0]
 			d.role = 'Website Manager'
 			d.save(1)
-
-def cleanup_file_data():
-	webnotes.conn.commit()
-	try:
-		webnotes.conn.sql("""alter table `tabFile Data` drop column blob_content""")
-	except:
-		pass
-	webnotes.conn.begin()
-
-def update_patch_log():
-	webnotes.conn.commit()
-	webnotes.conn.sql("""alter table __PatchLog engine=InnoDB""")
-	webnotes.conn.begin()
diff --git a/version.num b/version.num
index 2a9c18a..b0e9f8d 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-357
\ No newline at end of file
+358
\ No newline at end of file