# HG changeset patch # User Alexandre Richardson # Date 1328864779 -3600 # Node ID 14c52c5ee706975275601baf3c292f441b3d8484 # Parent 332596be995e6b56f1fcfab88fdd6bc081a4e8e6 [entities system table] change asource and source column size (closes #1951819) diff -r 332596be995e -r 14c52c5ee706 misc/migration/3.14.4_Any.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/migration/3.14.4_Any.py Fri Feb 10 10:06:19 2012 +0100 @@ -0,0 +1,9 @@ +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)) diff -r 332596be995e -r 14c52c5ee706 server/sources/native.py --- a/server/sources/native.py Fri Feb 10 10:01:04 2012 +0100 +++ b/server/sources/native.py Fri Feb 10 10:06:19 2012 +0100 @@ -1459,8 +1459,8 @@ CREATE TABLE entities ( eid INTEGER PRIMARY KEY NOT NULL, type VARCHAR(64) NOT NULL, - source VARCHAR(64) NOT NULL, - asource VARCHAR(64) NOT NULL, + source VARCHAR(128) NOT NULL, + asource VARCHAR(128) NOT NULL, mtime %s NOT NULL, extid VARCHAR(256) );; @@ -1471,7 +1471,7 @@ CREATE TABLE deleted_entities ( eid INTEGER PRIMARY KEY NOT NULL, type VARCHAR(64) NOT NULL, - source VARCHAR(64) NOT NULL, + source VARCHAR(128) NOT NULL, dtime %s NOT NULL, extid VARCHAR(256) );;