[migration/3.14.4] use the right API else we break sqlserver instances (closes #2211248) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 24 Feb 2012 12:44:28 +0100
branchstable
changeset 8263 a73ad255ff63
parent 8261 d4d9c88d4a5f
child 8264 a4b009ba92ce
[migration/3.14.4] use the right API else we break sqlserver instances (closes #2211248)
misc/migration/3.14.4_Any.py
--- a/misc/migration/3.14.4_Any.py	Thu Feb 23 19:05:36 2012 +0100
+++ b/misc/migration/3.14.4_Any.py	Fri Feb 24 12:44:28 2012 +0100
@@ -4,6 +4,7 @@
 rdefdef = schema['CWSource'].rdef('name')
 attrtype = y2sql.type_from_constraints(dbhelper, rdefdef.object, rdefdef.constraints).split()[0]
 
-sql(dbhelper.sql_change_col_type('entities', 'asource', attrtype, False))
-sql(dbhelper.sql_change_col_type('entities', 'source', attrtype, False))
-sql(dbhelper.sql_change_col_type('deleted_entities', 'source', attrtype, False))
+cursor = session.cnxset['system']
+dbhelper.change_col_type(cursor, 'entities', 'asource', attrtype, False)
+dbhelper.change_col_type(cursor, 'entities', 'source', attrtype, False)
+dbhelper.change_col_type(cursor, 'deleted_entities', 'source', attrtype, False)