diff --git a/core/src/main/java/google/registry/model/server/Lock.java b/core/src/main/java/google/registry/model/server/Lock.java
index cba3d3cc7..d9488be3e 100644
--- a/core/src/main/java/google/registry/model/server/Lock.java
+++ b/core/src/main/java/google/registry/model/server/Lock.java
@@ -88,8 +88,7 @@ public class Lock extends ImmutableObject implements Serializable {
*
See {@link RequestStatusCheckerImpl#getLogId} for details about how it's created in
* practice.
*/
- @Column(nullable = false)
- String requestLogId;
+ @Column String requestLogId;
/** When the lock can be considered implicitly released. */
@Column(nullable = false)
diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html
index 72f6fe7d2..8a0605836 100644
--- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html
+++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html
@@ -261,11 +261,11 @@ td.section {
generated on |
- 2023-01-20 18:26:00.403125 |
+ 2023-01-20 19:50:48.623695 |
last flyway file |
- V133__add_pull_queue_replace_columns.sql |
+ V134__drop_not_null_request_id_lock_table.sql |
@@ -284,7 +284,7 @@ td.section {
generated on
- 2023-01-20 18:26:00.403125
+ 2023-01-20 19:50:48.623695
diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html
index 3001c012d..942297618 100644
--- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html
+++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html
@@ -261,11 +261,11 @@ td.section {
generated on |
- 2023-01-20 18:25:58.806689 |
+ 2023-01-20 19:50:45.218406 |
last flyway file |
- V133__add_pull_queue_replace_columns.sql |
+ V134__drop_not_null_request_id_lock_table.sql |
@@ -284,7 +284,7 @@ td.section {
generated on
- 2023-01-20 18:25:58.806689
+ 2023-01-20 19:50:45.218406
@@ -5672,7 +5672,7 @@ td.section {
- text not null
+ text
@@ -11795,7 +11795,7 @@ td.section {
|
request_log_id |
- text not null |
+ text |
|
diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt
index e0e6b9d56..636a996d5 100644
--- a/db/src/main/resources/sql/flyway.txt
+++ b/db/src/main/resources/sql/flyway.txt
@@ -131,3 +131,4 @@ V130__add_login_email_column_to_registrarpoc.sql
V131__add_default_promo_tokens_to_registry.sql
V132__drop_gae_user_id_from_registrar_poc.sql
V133__add_pull_queue_replace_columns.sql
+V134__drop_not_null_request_id_lock_table.sql
diff --git a/db/src/main/resources/sql/flyway/V134__drop_not_null_request_id_lock_table.sql b/db/src/main/resources/sql/flyway/V134__drop_not_null_request_id_lock_table.sql
new file mode 100644
index 000000000..08d0c2780
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V134__drop_not_null_request_id_lock_table.sql
@@ -0,0 +1,15 @@
+-- Copyright 2022 The Nomulus Authors. All Rights Reserved.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+ALTER TABLE "Lock" ALTER COLUMN request_log_id DROP NOT NULL;
diff --git a/db/src/main/resources/sql/schema/db-schema.sql.generated b/db/src/main/resources/sql/schema/db-schema.sql.generated
index 86cf3dcd5..b0525df10 100644
--- a/db/src/main/resources/sql/schema/db-schema.sql.generated
+++ b/db/src/main/resources/sql/schema/db-schema.sql.generated
@@ -488,7 +488,7 @@
scope text not null,
acquired_time timestamptz not null,
expiration_time timestamptz not null,
- request_log_id text not null,
+ request_log_id text,
primary key (resource_name, scope)
);
diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql
index b47498865..394090c83 100644
--- a/db/src/main/resources/sql/schema/nomulus.golden.sql
+++ b/db/src/main/resources/sql/schema/nomulus.golden.sql
@@ -645,7 +645,7 @@ CREATE TABLE public."Lock" (
scope text NOT NULL,
acquired_time timestamp with time zone NOT NULL,
expiration_time timestamp with time zone NOT NULL,
- request_log_id text NOT NULL
+ request_log_id text
);