Feature extend target attributes constraints (#799)
* extended target attributes key limit to 128 characters Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com> * fixed tests Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
caca308f47
commit
473b6b2cc5
@@ -156,8 +156,8 @@ public class JpaTarget extends AbstractJpaNamedEntity implements Target, EventAw
|
||||
*/
|
||||
@CascadeOnDelete
|
||||
@ElementCollection
|
||||
@Column(name = "attribute_value", length = 128)
|
||||
@MapKeyColumn(name = "attribute_key", nullable = false, length = 32)
|
||||
@Column(name = "attribute_value", length = Target.CONTROLLER_ATTRIBUTE_VALUE_SIZE)
|
||||
@MapKeyColumn(name = "attribute_key", nullable = false, length = Target.CONTROLLER_ATTRIBUTE_KEY_SIZE)
|
||||
@CollectionTable(name = "sp_target_attributes", joinColumns = {
|
||||
@JoinColumn(name = "target_id", nullable = false, updatable = false) }, foreignKey = @ForeignKey(value = ConstraintMode.CONSTRAINT, name = "fk_targ_attrib_target"))
|
||||
private final Map<String, String> controllerAttributes = Collections.synchronizedMap(new HashMap<String, String>());
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE sp_target_attributes ALTER COLUMN attribute_key SET DATA TYPE VARCHAR(128);
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE sp_target_attributes ALTER COLUMN attribute_key VARCHAR(128);
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE sp_target_attributes MODIFY attribute_key VARCHAR(128);
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE sp_target_attributes ALTER COLUMN attribute_key VARCHAR(128);
|
||||
Reference in New Issue
Block a user