Skip to content

Commit

Permalink
refactor: set suitable type for postgres and h2
Browse files Browse the repository at this point in the history
  • Loading branch information
borjom1 committed May 6, 2024
1 parent b16719c commit 854c6d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class User {
@Column(nullable = false)
private boolean isOnline;

@Column(nullable = false, columnDefinition = "timestamptz default now()")
@Column(nullable = false, columnDefinition = "TIMESTAMP WITH TIME ZONE default now()")
@Builder.Default
private ZonedDateTime lastSeen = now().plusSeconds(1L);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public class UserEntity {
@ColumnDefault("false")
private boolean isBlocked;

@Column(nullable = false, columnDefinition = "timestamptz default now()")
@Column(nullable = false, columnDefinition = "TIMESTAMP WITH TIME ZONE default now()")
@Builder.Default
private ZonedDateTime createdAt = now();

@Column(nullable = false, columnDefinition = "timestamptz default now()")
@Column(nullable = false, columnDefinition = "TIMESTAMP WITH TIME ZONE default now()")
@Builder.Default
private ZonedDateTime lastSeen = now().plusSeconds(1L);

Expand Down

0 comments on commit 854c6d8

Please sign in to comment.