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:
commit
9b9dac533d
3 changed files with 5 additions and 7 deletions
|
@ -11,6 +11,8 @@ stages:
|
||||||
smarthut_deploy:
|
smarthut_deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
|
tags:
|
||||||
|
- dind
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
variables:
|
variables:
|
||||||
|
|
|
@ -49,17 +49,13 @@ public abstract class Device {
|
||||||
* The name for the category of this particular device (e.g 'dimmer'). Not stored in the
|
* The name for the category of this particular device (e.g 'dimmer'). Not stored in the
|
||||||
* database but set thanks to constructors
|
* 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
|
* The way this device behaves in the automation flow. Not stored in the database but set thanks
|
||||||
* to constructors
|
* to constructors
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(hidden = true)
|
@Transient private final FlowType flowType;
|
||||||
@Transient
|
|
||||||
private final FlowType flowType;
|
|
||||||
|
|
||||||
public long getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class Room {
|
||||||
* inserting from a REST call.
|
* inserting from a REST call.
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "user_id", nullable = false, unique = true)
|
@Column(name = "user_id", nullable = false)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** The user given name of this room (e.g. 'Master bedroom') */
|
/** The user given name of this room (e.g. 'Master bedroom') */
|
||||||
|
|
Loading…
Reference in a new issue