Public Access
Support now null as not initialized for SteamId
This commit is contained in:
1 parent
7d32c7e04a
commit
dda7e50963
2 files changed
+3
-11
No files matched your search
+3
-2
@@ -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)
|
||||||
@@ -34,4 +35,4 @@ public class RegisteredUserEntity {
|
|||||||
|
|
||||||
@Column(name = "last_login_date")
|
@Column(name = "last_login_date")
|
||||||
private LocalDateTime lastLoginDate;
|
private LocalDateTime lastLoginDate;
|
||||||
}
|
}
|
||||||
@@ -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;
|
|
||||||
Reference in new issue
Block a user