misc/migration/3.14.4_Any.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 16 Feb 2012 14:14:52 +0100
branchstable
changeset 8238 087bb529035c
parent 8205 14c52c5ee706
child 8263 a73ad255ff63
permissions -rw-r--r--
[spelling] fix dictionnary -> dictionary typo

from yams import schema2sql as y2sql

dbhelper = repo.system_source.dbhelper
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))