Merge pull request #279 from bsinno/fix_negative_max_assignments

Fix negative max assignments of softwareModuleTypes
This commit is contained in:
Kai Zimmermann
2016-08-31 08:55:44 +02:00
committed by GitHub
10 changed files with 126 additions and 21 deletions

View File

@@ -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)

View File

@@ -0,0 +1 @@
Update sp_software_module_type set max_ds_assignments = 1 where max_ds_assignments < 1;

View File

@@ -0,0 +1 @@
Update sp_software_module_type set max_ds_assignments = 1 where max_ds_assignments < 1;