[FIX] document : Migration of url attachments
lp bug: https://launchpad.net/bugs/809745 fixed bzr revid: dbr@tinyerp.com-20110809121553-sow9vfchkuc7du1u
This commit is contained in:
parent
13ecd980b7
commit
48e5b1b8b7
|
@ -64,7 +64,7 @@ class document_file(osv.osv):
|
|||
"SET parent_id = %s, db_datas = decode(encode(db_datas,'escape'), 'base64') " \
|
||||
"WHERE parent_id IS NULL", (parent_id,))
|
||||
|
||||
cr.execute("UPDATE ir_attachment SET file_size=length(db_datas) WHERE file_size = 0;")
|
||||
cr.execute("UPDATE ir_attachment SET file_size=length(db_datas) WHERE file_size = 0 and type = 'binary'")
|
||||
|
||||
cr.execute("ALTER TABLE ir_attachment ALTER parent_id SET NOT NULL")
|
||||
|
||||
|
|
Loading…
Reference in New Issue