Skip to content

Commit

Permalink
Changed timestamp column type to datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocordeiro committed Dec 30, 2024
1 parent f628f31 commit 01fbe51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/io/tcds/orm/column/TimestampColumn.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ class TimestampColumn<Entity>(
override fun columnType(): String = "TIMESTAMP"
override fun valueParam(value: Instant): Param<Instant> = InstantParam(this.name, value)
override fun entryParam(entry: Entity): Param<Instant> = InstantParam(this.name, valueOf(entry))
override fun ddl(): String = "`$name` TIMESTAMP NOT NULL"
override fun ddl(): String = "`$name` DATETIME(6) NOT NULL"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ class NullableTimestampColumn<Entity>(name: String, value: (Entity) -> Instant?)
override fun columnType(): String = "DATETIME NULL"
override fun valueParam(value: Instant?): Param<Instant?> = NullableInstantParam(this.name, value)
override fun entryParam(entry: Entity): Param<Instant?> = NullableInstantParam(this.name, valueOf(entry))
override fun ddl(): String = "`$name` TIMESTAMP"
override fun ddl(): String = "`$name` DATETIME(6)"
}

0 comments on commit 01fbe51

Please sign in to comment.