Merge pull request #279 from bsinno/fix_negative_max_assignments
Fix negative max assignments of softwareModuleTypes
This commit is contained in:
@@ -13,6 +13,7 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.UniqueConstraint;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
|
||||
|
||||
@@ -36,6 +37,7 @@ public class JpaSoftwareModuleType extends AbstractJpaNamedEntity implements Sof
|
||||
private String key;
|
||||
|
||||
@Column(name = "max_ds_assignments", nullable = false)
|
||||
@Min(1)
|
||||
private int maxAssignments;
|
||||
|
||||
@Column(name = "colour", nullable = true, length = 16)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Update sp_software_module_type set max_ds_assignments = 1 where max_ds_assignments < 1;
|
||||
@@ -0,0 +1 @@
|
||||
Update sp_software_module_type set max_ds_assignments = 1 where max_ds_assignments < 1;
|
||||
Reference in New Issue
Block a user