Merge branch '34-drop-uniquess-constraint-on-user-fk-in-room-entity' into 'dev'

Resolve "Drop uniquess constraint on User FK in Room entity"

Closes #34

See merge request sa4-2020/the-sanmarinoes/backend!41
This commit is contained in:
Claudio Maggioni 2020-03-16 15:12:13 +01:00
commit 9b9dac533d
3 changed files with 5 additions and 7 deletions

View file

@ -11,6 +11,8 @@ stages:
smarthut_deploy:
stage: deploy
image: docker:latest
tags:
- dind
services:
- docker:dind
variables:

View file

@ -49,17 +49,13 @@ public abstract class Device {
* The name for the category of this particular device (e.g 'dimmer'). Not stored in the
* database but set thanks to constructors
*/
@ApiModelProperty(hidden = true)
@Transient
private final String kind;
@Transient private final String kind;
/**
* The way this device behaves in the automation flow. Not stored in the database but set thanks
* to constructors
*/
@ApiModelProperty(hidden = true)
@Transient
private final FlowType flowType;
@Transient private final FlowType flowType;
public long getId() {
return id;

View file

@ -139,7 +139,7 @@ public class Room {
* inserting from a REST call.
*/
@NotNull
@Column(name = "user_id", nullable = false, unique = true)
@Column(name = "user_id", nullable = false)
private Long userId;
/** The user given name of this room (e.g. 'Master bedroom') */