jenkins-bot has submitted this change and it was merged.

Change subject: PostgreSQL: Allow rc_cur_time field to be null.
......................................................................


PostgreSQL: Allow rc_cur_time field to be null.

The column recentchanges.rc_cur_time is no longer populated by SQL,
so PostgreSQL must be changed to allow the NULL value for it.

In MySQL, the empty string is used as a surrogate for NULL, but that
is not allowed in PostgreSQL.

Bug: 61318
Change-Id: I6733ef11152d545382bec087d992515dcf9aec0b
(cherry picked from commit 8e4b41a50866e9503ed1498e6ac70b31c88d66ca)
---
M includes/installer/PostgresUpdater.php
M maintenance/postgres/tables.sql
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/PostgresUpdater.php 
b/includes/installer/PostgresUpdater.php
index c5c10b3..15e18ed 100644
--- a/includes/installer/PostgresUpdater.php
+++ b/includes/installer/PostgresUpdater.php
@@ -234,6 +234,7 @@
                        array( 'changeNullableField', 'image', 'img_metadata', 
'NOT NULL' ),
                        array( 'changeNullableField', 'filearchive', 
'fa_metadata', 'NOT NULL' ),
                        array( 'changeNullableField', 'recentchanges', 
'rc_cur_id', 'NULL' ),
+                       array( 'changeNullableField', 'recentchanges', 
'rc_cur_time', 'NULL' ),
 
                        array( 'checkOiDeleted' ),
 
diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql
index 266cb3b..a3fb042 100644
--- a/maintenance/postgres/tables.sql
+++ b/maintenance/postgres/tables.sql
@@ -406,7 +406,7 @@
 CREATE TABLE recentchanges (
   rc_id              INTEGER      NOT NULL  PRIMARY KEY DEFAULT 
nextval('recentchanges_rc_id_seq'),
   rc_timestamp       TIMESTAMPTZ  NOT NULL,
-  rc_cur_time        TIMESTAMPTZ  NOT NULL,
+  rc_cur_time        TIMESTAMPTZ      NULL,
   rc_user            INTEGER          NULL  REFERENCES mwuser(user_id) ON 
DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
   rc_user_text       TEXT         NOT NULL,
   rc_namespace       SMALLINT     NOT NULL,

-- 
To view, visit https://gerrit.wikimedia.org/r/127586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6733ef11152d545382bec087d992515dcf9aec0b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Jjanes <jeff.ja...@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Jjanes <jeff.ja...@gmail.com>
Gerrit-Reviewer: MarkAHershberger <m...@nichework.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper <sa...@saper.info>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to