Added index to Observation dates.

This commit is contained in:
neviyn 2018-10-09 12:03:00 +01:00
parent bec332f7ab
commit 77dbe259f0

View File

@ -40,6 +40,7 @@ enum class RatingCategory {
}
@Entity
@Table(indexes = [Index(name = "dateIndex", columnList = "date")])
data class Observation(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ -47,7 +48,7 @@ data class Observation(
@JsonIgnore
@ManyToOne
val site: Site,
@Column(nullable = false)
@Column(nullable = false, name = "date")
val date: LocalDate,
@Column(nullable = false)
val type: TrainingType,