Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Merge requests
!123994
Upgrade Rails to 7.0.5
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Upgrade Rails to 7.0.5
id-upgrade-to-rails-7.0.5
into
master
Overview
14
Commits
7
Pipelines
7
Changes
2
All threads resolved!
Hide all comments
Merged
Igor Drozdov
requested to merge
id-upgrade-to-rails-7.0.5
into
master
1 year ago
Overview
14
Commits
7
Pipelines
7
Changes
2
All threads resolved!
Hide all comments
Expand
What does this MR do and why?
This MR:
Upgrades the Rails gem version to 7.0.5
Removes patches that were merged upstream
0
0
Merge request reports
Viewing commit
b6eb2136
Prev
Next
Show latest version
2 files
+
0
−
60
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
Verified
b6eb2136
Remove Activerecord Postgresql Timestamp patch
· b6eb2136
Igor Drozdov
authored
1 year ago
It has been merged upstream
config/initializers/activerecord_postgresql_timestamp_with_timezone_patches.rb deleted
100644 → 0
+
0
−
40
Options
# frozen_string_literal: true
# Monkey patch to fix errors like `undefined method 'getutc' for Date' seen
# during Rails 7 upgrade:
#
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90907#note_1253684870 and
# https://github.com/rails/rails/issues/46341#issuecomment-1406391573
if
Rails
.
gem_version
>=
Gem
::
Version
.
new
(
'7.0.5'
)
raise
"Remove `
#{
__FILE__
}
`. This is backport of https://github.com/rails/rails/pull/46365"
end
module
ActiveRecord
module
ConnectionAdapters
module
PostgreSQL
module
OID
# :nodoc:
class
TimestampWithTimeZone
<
DateTime
# :nodoc:
def
type
real_type_unless_aliased
(
:timestamptz
)
end
def
cast_value
(
value
)
return
if
value
.
blank?
time
=
super
return
time
unless
time
.
acts_like?
(
:time
)
# While in UTC mode, the PG gem may not return times back in "UTC" even if they were provided to
# Postgres in UTC. We prefer times always in UTC, so here we convert back.
if
is_utc?
time
.
getutc
else
time
.
getlocal
end
end
end
end
end
end
end
Loading