# HG changeset patch # User Aurelien Campeas # Date 1242740742 -7200 # Node ID b54512ff38842d864bdc9fa5f60753e6a081153a # Parent 015dfeaf1d89628a9d0f6dc1a21bf5fc00694a71# Parent 642a1a120a9210698a13676ec4863fe179b87e9e merge diff -r 015dfeaf1d89 -r b54512ff3884 server/schemaserial.py --- a/server/schemaserial.py Tue May 19 15:42:32 2009 +0200 +++ b/server/schemaserial.py Tue May 19 15:45:42 2009 +0200 @@ -14,6 +14,7 @@ from yams import schema as schemamod, buildobjs as ybo from cubicweb.schema import CONSTRAINTS, ETYPE_NAME_MAP +from cubicweb.server import sqlutils def group_mapping(cursor, interactive=True): """create a group mapping from an rql cursor @@ -124,7 +125,8 @@ if etype in ETYPE_NAME_MAP: # XXX <2.45 bw compat print 'fixing etype name from %s to %s' % (etype, ETYPE_NAME_MAP[etype]) # can't use write rql queries at this point, use raw sql - session.system_sql('UPDATE CWEType SET name=%(n)s WHERE eid=%(x)s', + session.system_sql('UPDATE %(p)sCWEType SET %(p)sname=%%(n)s WHERE %(p)seid=%%(x)s' + % {'p': sqlutils.SQL_PREFIX}, {'x': eid, 'n': ETYPE_NAME_MAP[etype]}) session.system_sql('UPDATE entities SET type=%(n)s WHERE type=%(x)s', {'x': etype, 'n': ETYPE_NAME_MAP[etype]})