Hi all,
I'm changing through Administration Module a Class attribute data type from STRING (250) to STRING (1000).
No errors are shown in the GUI or the cmdbuild log:
INFO 2018-10-22 14:38:54 [jsonrpc ] Calling url /schema/modclass/saveattribute
INFO 2018-10-22 14:38:54 [cmdbuild] creating or updating attribute 'Attribute[name=Description,description=Description,ownerName=api_catalog,ownerNamespace=<null>,group=,fkDestinationName=,type=org.cmdbuild.dao.entrytype.attributetype.StringAttributeType@77172a0e,defaultValue=<null>,mode=WRITE,index=-1,classOrder=0,editorType=,filter=,metadata={},conditions=[ACTIVE, DISPLAYABLE_IN_LIST]]'
INFO 2018-10-22 14:38:54 [cmdbuild] checking common pre-conditions
INFO 2018-10-22 14:38:54 [cmdbuild] checking specific pre-conditions
INFO 2018-10-22 14:38:54 [cmdbuild] attribute already created, updating existing one
INFO 2018-10-22 14:38:54 [ddsql ] SELECT * FROM cm_modify_attribute('"api_catalog"'::regclass,'Description','varchar(1000)',null,false,false,ARRAY[]::text[],ARRAY[]::text[]);
INFO 2018-10-22 14:38:54 [cmdbuild] checking post-conditions
INFO 2018-10-22 14:38:54 [cmdbuild] setting metadata for attribute 'Description'
INFO 2018-10-22 14:38:54 [jsonrpc ] Calling url /schema/modclass/getattributelist
INFO 2018-10-22 14:38:54 [cmdbuild] getting all-in-one 'interface org.cmdbuild.services.event.Observer'
cmdbuild=# \d+ api_catalog;Table "public.api_catalog"Column | Type | Modifiers | Storage | Stats target | Description-----------------+-----------------------------+------------------------------------+----------+--------------+------------------------------------------------------------------------------------------------------------------------------------Id | integer | not null default _cm_new_card_id() | plain | | MODE: reservedIdClass | regclass | not null | plain | | MODE: reservedCode | character varying(100) | | extended | | MODE: read|DESCR: Code|INDEX: 1|BASEDSP: true|STATUS: active|GROUP:Description | character varying(250) | | extended | | MODE: read|DESCR: Description|INDEX: 2|BASEDSP: true|GROUP:
Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL []; ERROR: value too long for type character varying(250); nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(250)