Support now null as not initialized for SteamId

This commit is contained in:
lobo committed 2026-04-19 14:35:02 +02:00
1 parent c7ec8c2f7c
commit 2d4fb5bef7
2 files changed
+2 -10

No files matched your search

@@ -12,6 +12,7 @@ import java.time.LocalDateTime;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class RegisteredUserEntity { public class RegisteredUserEntity {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -26,7 +27,7 @@ public class RegisteredUserEntity {
@Column(nullable = false) @Column(nullable = false)
private boolean enabled; private boolean enabled;
@Column(name = "steam_id", unique = true, nullable = false) @Column(name = "steam_id", unique = true)
private Long steamId; private Long steamId;
@Column(name = "registration_date", nullable = false) @Column(name = "registration_date", nullable = false)
@@ -1,9 +0,0 @@
UPDATE users
SET steam_id = 0
WHERE steam_id IS NULL;
ALTER TABLE users
ALTER COLUMN steam_id SET DEFAULT 0;
ALTER TABLE users
ALTER COLUMN steam_id SET NOT NULL;