webnotes.model.doctype (new version)

This commit is contained in:
Rushabh Mehta
2012-11-29 11:49:56 +05:30
parent a5d18706b7
commit d7fe2bfe1b
18 changed files with 15 additions and 842 deletions

View File

@@ -1,6 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
webnotes.conn.commit()
webnotes.conn.sql("alter table __CacheItem modify `value` longtext")
webnotes.conn.begin()

View File

@@ -1,12 +0,0 @@
from __future__ import unicode_literals
def execute():
"""drop and create __CacheItem table again"""
import webnotes
webnotes.conn.commit()
webnotes.conn.sql("drop table __CacheItem")
webnotes.conn.sql("""create table __CacheItem(
`key` VARCHAR(180) NOT NULL PRIMARY KEY,
`value` LONGTEXT,
`expires_on` DATETIME
) ENGINE=MyISAM DEFAULT CHARSET=utf8""")
webnotes.conn.begin()

View File

@@ -116,8 +116,8 @@ def create_file_list():
obj.make_file_list()
from webnotes.model.db_schema import updatedb
updatedb(obj.doc.name)
from webnotes.utils.cache import CacheItem
CacheItem(obj.doc.name).clear()
webnotes.clear_cache(doctype=obj.doc.name)
def change_to_decimal():
print "in change to decimal"

View File

@@ -50,9 +50,8 @@ def move_customizations():
webnotes.conn.sql("""\
delete from `tabProperty Setter`
where doc_type='Communication Log'""")
from webnotes.utils.cache import CacheItem
CacheItem('Communication').clear()
webnotes.clear_cache(doctype="Communication")
def remove_communication_log():
import webnotes

View File

@@ -278,11 +278,6 @@ patch_list = [
'patch_file': 'after_sync_cleanup',
'description': 'cleanup after sync'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'change_cacheitem_schema',
'description': 'Modified datatype of `value` column from text to longtext'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'remove_default_from_rv_detail',
@@ -458,11 +453,6 @@ patch_list = [
'patch_file': 'delete_about_contact',
'description': "delete depracated doctypes of website module"
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'cache_item_table',
'description': "create cache item table again"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'reload_pr_po_mapper',