From 7e6cbd7ae9e4f4f2d06ff799024dcee012782bdb Mon Sep 17 00:00:00 2001 From: jdarwood007 Date: Sat, 15 Nov 2025 15:53:06 -0800 Subject: [PATCH] [3.0] Move to BIGINT for timestamps Fixes #8947 --- Sources/Db/Schema/v3_0/BackgroundTasks.php | 2 +- Sources/Db/Schema/v3_0/BanGroups.php | 4 ++-- Sources/Db/Schema/v3_0/LogActions.php | 2 +- Sources/Db/Schema/v3_0/LogBanned.php | 2 +- Sources/Db/Schema/v3_0/LogComments.php | 2 +- Sources/Db/Schema/v3_0/LogErrors.php | 2 +- Sources/Db/Schema/v3_0/LogFloodcontrol.php | 2 +- Sources/Db/Schema/v3_0/LogGroupRequests.php | 4 ++-- Sources/Db/Schema/v3_0/LogOnline.php | 2 +- Sources/Db/Schema/v3_0/LogPackages.php | 4 ++-- Sources/Db/Schema/v3_0/LogReported.php | 4 ++-- Sources/Db/Schema/v3_0/LogReportedComments.php | 2 +- Sources/Db/Schema/v3_0/LogScheduledTasks.php | 2 +- Sources/Db/Schema/v3_0/LogSpiderHits.php | 2 +- Sources/Db/Schema/v3_0/LogSpiderStats.php | 2 +- Sources/Db/Schema/v3_0/LogSubscribed.php | 4 ++-- Sources/Db/Schema/v3_0/MailQueue.php | 4 ++-- Sources/Db/Schema/v3_0/MemberLogins.php | 2 +- Sources/Db/Schema/v3_0/Members.php | 4 ++-- Sources/Db/Schema/v3_0/Mentions.php | 2 +- Sources/Db/Schema/v3_0/Messages.php | 4 ++-- Sources/Db/Schema/v3_0/PersonalMessages.php | 2 +- Sources/Db/Schema/v3_0/Polls.php | 2 +- Sources/Db/Schema/v3_0/ScheduledTasks.php | 2 +- Sources/Db/Schema/v3_0/Sessions.php | 2 +- Sources/Db/Schema/v3_0/Topics.php | 2 +- Sources/Db/Schema/v3_0/UserAlerts.php | 2 +- Sources/Db/Schema/v3_0/UserDrafts.php | 2 +- Sources/Db/Schema/v3_0/UserLikes.php | 2 +- 29 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Sources/Db/Schema/v3_0/BackgroundTasks.php b/Sources/Db/Schema/v3_0/BackgroundTasks.php index 09824ba00ac..b5d2a3c44dd 100644 --- a/Sources/Db/Schema/v3_0/BackgroundTasks.php +++ b/Sources/Db/Schema/v3_0/BackgroundTasks.php @@ -64,7 +64,7 @@ public function __construct() ), 'claimed_time' => new Column( name: 'claimed_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/BanGroups.php b/Sources/Db/Schema/v3_0/BanGroups.php index 97d3014179a..be5b2357a82 100644 --- a/Sources/Db/Schema/v3_0/BanGroups.php +++ b/Sources/Db/Schema/v3_0/BanGroups.php @@ -52,14 +52,14 @@ public function __construct() ), 'ban_time' => new Column( name: 'ban_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, ), 'expire_time' => new Column( name: 'expire_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: false, default: null, diff --git a/Sources/Db/Schema/v3_0/LogActions.php b/Sources/Db/Schema/v3_0/LogActions.php index 8745f59e759..209a96926f1 100644 --- a/Sources/Db/Schema/v3_0/LogActions.php +++ b/Sources/Db/Schema/v3_0/LogActions.php @@ -52,7 +52,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogBanned.php b/Sources/Db/Schema/v3_0/LogBanned.php index 7824a4b5100..0b28aafb326 100644 --- a/Sources/Db/Schema/v3_0/LogBanned.php +++ b/Sources/Db/Schema/v3_0/LogBanned.php @@ -64,7 +64,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogComments.php b/Sources/Db/Schema/v3_0/LogComments.php index a6851f0bbc3..de0bf6f8e8f 100644 --- a/Sources/Db/Schema/v3_0/LogComments.php +++ b/Sources/Db/Schema/v3_0/LogComments.php @@ -80,7 +80,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/LogErrors.php b/Sources/Db/Schema/v3_0/LogErrors.php index a2501fbc97e..6bc295ffe15 100644 --- a/Sources/Db/Schema/v3_0/LogErrors.php +++ b/Sources/Db/Schema/v3_0/LogErrors.php @@ -45,7 +45,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogFloodcontrol.php b/Sources/Db/Schema/v3_0/LogFloodcontrol.php index e1f636aac5c..4d83039f13a 100644 --- a/Sources/Db/Schema/v3_0/LogFloodcontrol.php +++ b/Sources/Db/Schema/v3_0/LogFloodcontrol.php @@ -44,7 +44,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogGroupRequests.php b/Sources/Db/Schema/v3_0/LogGroupRequests.php index 31648a48f0b..847f6ef56fd 100644 --- a/Sources/Db/Schema/v3_0/LogGroupRequests.php +++ b/Sources/Db/Schema/v3_0/LogGroupRequests.php @@ -59,7 +59,7 @@ public function __construct() ), 'time_applied' => new Column( name: 'time_applied', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, @@ -99,7 +99,7 @@ public function __construct() ), 'time_acted' => new Column( name: 'time_acted', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogOnline.php b/Sources/Db/Schema/v3_0/LogOnline.php index aceac21ebdc..65b443d9d58 100644 --- a/Sources/Db/Schema/v3_0/LogOnline.php +++ b/Sources/Db/Schema/v3_0/LogOnline.php @@ -45,7 +45,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/LogPackages.php b/Sources/Db/Schema/v3_0/LogPackages.php index 86ded6c1e24..0b0d205cebe 100644 --- a/Sources/Db/Schema/v3_0/LogPackages.php +++ b/Sources/Db/Schema/v3_0/LogPackages.php @@ -86,7 +86,7 @@ public function __construct() ), 'time_installed' => new Column( name: 'time_installed', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), @@ -105,7 +105,7 @@ public function __construct() ), 'time_removed' => new Column( name: 'time_removed', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/LogReported.php b/Sources/Db/Schema/v3_0/LogReported.php index dd1ba2a0b57..a56143745b7 100644 --- a/Sources/Db/Schema/v3_0/LogReported.php +++ b/Sources/Db/Schema/v3_0/LogReported.php @@ -92,13 +92,13 @@ public function __construct() ), 'time_started' => new Column( name: 'time_started', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), 'time_updated' => new Column( name: 'time_updated', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/LogReportedComments.php b/Sources/Db/Schema/v3_0/LogReportedComments.php index 13de656c7c5..eab50350850 100644 --- a/Sources/Db/Schema/v3_0/LogReportedComments.php +++ b/Sources/Db/Schema/v3_0/LogReportedComments.php @@ -75,7 +75,7 @@ public function __construct() ), 'time_sent' => new Column( name: 'time_sent', - type: 'int', + type: 'bigint', not_null: true, ), ]; diff --git a/Sources/Db/Schema/v3_0/LogScheduledTasks.php b/Sources/Db/Schema/v3_0/LogScheduledTasks.php index bb767d71c98..1b53ce8c7d5 100644 --- a/Sources/Db/Schema/v3_0/LogScheduledTasks.php +++ b/Sources/Db/Schema/v3_0/LogScheduledTasks.php @@ -50,7 +50,7 @@ public function __construct() ), 'time_run' => new Column( name: 'time_run', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/LogSpiderHits.php b/Sources/Db/Schema/v3_0/LogSpiderHits.php index fa27669518b..7d478cb664f 100644 --- a/Sources/Db/Schema/v3_0/LogSpiderHits.php +++ b/Sources/Db/Schema/v3_0/LogSpiderHits.php @@ -52,7 +52,7 @@ public function __construct() ), 'log_time' => new Column( name: 'log_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogSpiderStats.php b/Sources/Db/Schema/v3_0/LogSpiderStats.php index 2861089952d..da780f87bdf 100644 --- a/Sources/Db/Schema/v3_0/LogSpiderStats.php +++ b/Sources/Db/Schema/v3_0/LogSpiderStats.php @@ -51,7 +51,7 @@ public function __construct() ), 'last_seen' => new Column( name: 'last_seen', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/LogSubscribed.php b/Sources/Db/Schema/v3_0/LogSubscribed.php index 73ba512a878..caf5bda5c51 100644 --- a/Sources/Db/Schema/v3_0/LogSubscribed.php +++ b/Sources/Db/Schema/v3_0/LogSubscribed.php @@ -64,13 +64,13 @@ public function __construct() ), 'start_time' => new Column( name: 'start_time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), 'end_time' => new Column( name: 'end_time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/MailQueue.php b/Sources/Db/Schema/v3_0/MailQueue.php index 34e8895f726..c3a9fea2d2e 100644 --- a/Sources/Db/Schema/v3_0/MailQueue.php +++ b/Sources/Db/Schema/v3_0/MailQueue.php @@ -45,7 +45,7 @@ public function __construct() ), 'time_sent' => new Column( name: 'time_sent', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), @@ -94,7 +94,7 @@ public function __construct() ), 'next_try' => new Column( name: 'next_try', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/MemberLogins.php b/Sources/Db/Schema/v3_0/MemberLogins.php index 8aace935659..955a12178c5 100644 --- a/Sources/Db/Schema/v3_0/MemberLogins.php +++ b/Sources/Db/Schema/v3_0/MemberLogins.php @@ -50,7 +50,7 @@ public function __construct() ), 'time' => new Column( name: 'time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/Members.php b/Sources/Db/Schema/v3_0/Members.php index f54da38100d..8b78d5efe42 100644 --- a/Sources/Db/Schema/v3_0/Members.php +++ b/Sources/Db/Schema/v3_0/Members.php @@ -53,7 +53,7 @@ public function __construct() ), 'date_registered' => new Column( name: 'date_registered', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, @@ -81,7 +81,7 @@ public function __construct() ), 'last_login' => new Column( name: 'last_login', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/Mentions.php b/Sources/Db/Schema/v3_0/Mentions.php index a0bbc88fe51..cf12a6d39ab 100644 --- a/Sources/Db/Schema/v3_0/Mentions.php +++ b/Sources/Db/Schema/v3_0/Mentions.php @@ -62,7 +62,7 @@ public function __construct() ), 'time' => new Column( name: 'time', - type: 'int', + type: 'bigint', not_null: true, ), ]; diff --git a/Sources/Db/Schema/v3_0/Messages.php b/Sources/Db/Schema/v3_0/Messages.php index 6963693f9bd..2f88b4a87fe 100644 --- a/Sources/Db/Schema/v3_0/Messages.php +++ b/Sources/Db/Schema/v3_0/Messages.php @@ -85,7 +85,7 @@ public function __construct() ), 'poster_time' => new Column( name: 'poster_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, @@ -144,7 +144,7 @@ public function __construct() ), 'modified_time' => new GeneratedColumn( name: 'modified_time', - type: 'int', + type: 'bigint', unsigned: true, generation_expression: Db::$db->title === POSTGRE_TITLE ? 'COALESCE((edit_history #>> \'{0,0}\'::text[])::integer, 0)' : 'COALESCE(JSON_UNQUOTE(JSON_EXTRACT(edit_history, "$[0][0]")), 0)', stored: true, diff --git a/Sources/Db/Schema/v3_0/PersonalMessages.php b/Sources/Db/Schema/v3_0/PersonalMessages.php index b4eead64b07..4babe2537da 100644 --- a/Sources/Db/Schema/v3_0/PersonalMessages.php +++ b/Sources/Db/Schema/v3_0/PersonalMessages.php @@ -73,7 +73,7 @@ public function __construct() ), 'msgtime' => new Column( name: 'msgtime', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/Polls.php b/Sources/Db/Schema/v3_0/Polls.php index 47439c0e83f..569f1bb15ec 100644 --- a/Sources/Db/Schema/v3_0/Polls.php +++ b/Sources/Db/Schema/v3_0/Polls.php @@ -66,7 +66,7 @@ public function __construct() ), 'expire_time' => new Column( name: 'expire_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/ScheduledTasks.php b/Sources/Db/Schema/v3_0/ScheduledTasks.php index 89f17bc2dd6..d89ef95b950 100644 --- a/Sources/Db/Schema/v3_0/ScheduledTasks.php +++ b/Sources/Db/Schema/v3_0/ScheduledTasks.php @@ -166,7 +166,7 @@ public function __construct() ), 'next_time' => new Column( name: 'next_time', - type: 'int', + type: 'bigint', not_null: true, default: 0, ), diff --git a/Sources/Db/Schema/v3_0/Sessions.php b/Sources/Db/Schema/v3_0/Sessions.php index 471276ed6dc..5050fc59a88 100644 --- a/Sources/Db/Schema/v3_0/Sessions.php +++ b/Sources/Db/Schema/v3_0/Sessions.php @@ -45,7 +45,7 @@ public function __construct() ), 'last_update' => new Column( name: 'last_update', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/Topics.php b/Sources/Db/Schema/v3_0/Topics.php index 648767c5c78..2f9af4419df 100644 --- a/Sources/Db/Schema/v3_0/Topics.php +++ b/Sources/Db/Schema/v3_0/Topics.php @@ -145,7 +145,7 @@ public function __construct() ), 'redirect_expires' => new Column( name: 'redirect_expires', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/UserAlerts.php b/Sources/Db/Schema/v3_0/UserAlerts.php index 85867368cd3..8956d49322e 100644 --- a/Sources/Db/Schema/v3_0/UserAlerts.php +++ b/Sources/Db/Schema/v3_0/UserAlerts.php @@ -45,7 +45,7 @@ public function __construct() ), 'alert_time' => new Column( name: 'alert_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/UserDrafts.php b/Sources/Db/Schema/v3_0/UserDrafts.php index 8cde66313e8..489d6b26e38 100644 --- a/Sources/Db/Schema/v3_0/UserDrafts.php +++ b/Sources/Db/Schema/v3_0/UserDrafts.php @@ -72,7 +72,7 @@ public function __construct() ), 'poster_time' => new Column( name: 'poster_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0, diff --git a/Sources/Db/Schema/v3_0/UserLikes.php b/Sources/Db/Schema/v3_0/UserLikes.php index 63d3ac54c8c..3b1efaf4cda 100644 --- a/Sources/Db/Schema/v3_0/UserLikes.php +++ b/Sources/Db/Schema/v3_0/UserLikes.php @@ -59,7 +59,7 @@ public function __construct() ), 'like_time' => new Column( name: 'like_time', - type: 'int', + type: 'bigint', unsigned: true, not_null: true, default: 0,