Skip to content

Commit

Permalink
Remove 'id' field from database schema
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed May 14, 2024
1 parent a093e74 commit 680a063
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.radarbase.datadashboard.api.domain.model.Observation
import java.time.Duration

fun Observation.toDto(): ObservationDto = ObservationDto(
id = id,
project = project,
subject = subject,
source = source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ import java.util.*
@Entity
@Table(name = "observation")
data class Observation(
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(updatable = false, nullable = false)
@Id
val id: Long,

@Column(nullable = false)
@Id
val project: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@

<changeSet id="Create observation tables" author="pim" context="dev">
<createTable tableName="observation">
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="project" type="varchar(255)">
<constraints primaryKey="true" nullable="false"/>
</column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class ObservationResourceTest: JerseyTest() {

private fun createObservation(): Observation {
return Observation(
id = observationId,
project = "project-1",
subject = subjectId,
source = "source-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class ObservationServiceTest {

private fun createObservation(): Observation {
return Observation(
id = observationId,
project = "project-1",
subject = subjectId,
source = "source-1",
Expand Down

0 comments on commit 680a063

Please sign in to comment.