--- a/server/schemaserial.py Thu Dec 09 14:35:20 2010 +0000
+++ b/server/schemaserial.py Thu Dec 09 14:55:51 2010 +0100
@@ -126,8 +126,9 @@
sqlexec('UPDATE %(p)sCWEType SET %(p)sname=%%(n)s WHERE %(p)seid=%%(x)s'
% {'p': sqlutils.SQL_PREFIX}, {'x': eid, 'n': netype})
if etype.lower() != netype.lower():
- sqlexec('ALTER TABLE %s%s RENAME TO %s%s' % (
- sqlutils.SQL_PREFIX, etype, sqlutils.SQL_PREFIX, netype))
+ alter_table_sql = dbhelper.sql_rename_table(sqlutils.SQL_PREFIX+etype,
+ sqlutils.SQL_PREFIX+netype)
+ sqlexec(alter_table_sql)
sqlexec('UPDATE entities SET type=%(n)s WHERE type=%(x)s',
{'x': etype, 'n': netype})
session.commit(False)