author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 14 Feb 2012 15:14:40 +0100 | |
branch | stable |
changeset 8232 | 8c29253105ba |
parent 8205 | 14c52c5ee706 |
child 8263 | a73ad255ff63 |
permissions | -rw-r--r-- |
8205
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
1 |
from yams import schema2sql as y2sql |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
2 |
|
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
3 |
dbhelper = repo.system_source.dbhelper |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
4 |
rdefdef = schema['CWSource'].rdef('name') |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
5 |
attrtype = y2sql.type_from_constraints(dbhelper, rdefdef.object, rdefdef.constraints).split()[0] |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
6 |
|
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
7 |
sql(dbhelper.sql_change_col_type('entities', 'asource', attrtype, False)) |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
8 |
sql(dbhelper.sql_change_col_type('entities', 'source', attrtype, False)) |
14c52c5ee706
[entities system table] change asource and source column size (closes #1951819)
Alexandre Richardson <alexandre.richardson@logilab.fr>
parents:
diff
changeset
|
9 |
sql(dbhelper.sql_change_col_type('deleted_entities', 'source', attrtype, False)) |