mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Upgrade to Rails 7.0.3
This commit is contained in:
parent
ba148e082d
commit
5fb6dd5664
2
Gemfile
2
Gemfile
@ -18,7 +18,7 @@ else
|
|||||||
# this allows us to include the bits of rails we use without pieces we do not.
|
# this allows us to include the bits of rails we use without pieces we do not.
|
||||||
#
|
#
|
||||||
# To issue a rails update bump the version number here
|
# To issue a rails update bump the version number here
|
||||||
rails_version = '7.0.2.4'
|
rails_version = '7.0.3'
|
||||||
gem 'actionmailer', rails_version
|
gem 'actionmailer', rails_version
|
||||||
gem 'actionpack', rails_version
|
gem 'actionpack', rails_version
|
||||||
gem 'actionview', rails_version
|
gem 'actionview', rails_version
|
||||||
|
56
Gemfile.lock
56
Gemfile.lock
@ -1,25 +1,25 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actionmailer (7.0.2.4)
|
actionmailer (7.0.3)
|
||||||
actionpack (= 7.0.2.4)
|
actionpack (= 7.0.3)
|
||||||
actionview (= 7.0.2.4)
|
actionview (= 7.0.3)
|
||||||
activejob (= 7.0.2.4)
|
activejob (= 7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
net-imap
|
net-imap
|
||||||
net-pop
|
net-pop
|
||||||
net-smtp
|
net-smtp
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (7.0.2.4)
|
actionpack (7.0.3)
|
||||||
actionview (= 7.0.2.4)
|
actionview (= 7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
rack (~> 2.0, >= 2.2.0)
|
rack (~> 2.0, >= 2.2.0)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actionview (7.0.2.4)
|
actionview (7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
@ -28,15 +28,15 @@ GEM
|
|||||||
actionview (>= 6.0.a)
|
actionview (>= 6.0.a)
|
||||||
active_model_serializers (0.8.4)
|
active_model_serializers (0.8.4)
|
||||||
activemodel (>= 3.0)
|
activemodel (>= 3.0)
|
||||||
activejob (7.0.2.4)
|
activejob (7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.0.2.4)
|
activemodel (7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
activerecord (7.0.2.4)
|
activerecord (7.0.3)
|
||||||
activemodel (= 7.0.2.4)
|
activemodel (= 7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
activesupport (7.0.2.4)
|
activesupport (7.0.3)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
@ -349,9 +349,9 @@ GEM
|
|||||||
rails_multisite (4.0.1)
|
rails_multisite (4.0.1)
|
||||||
activerecord (> 5.0, < 7.1)
|
activerecord (> 5.0, < 7.1)
|
||||||
railties (> 5.0, < 7.1)
|
railties (> 5.0, < 7.1)
|
||||||
railties (7.0.2.4)
|
railties (7.0.3)
|
||||||
actionpack (= 7.0.2.4)
|
actionpack (= 7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 12.2)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
@ -509,14 +509,14 @@ PLATFORMS
|
|||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
actionmailer (= 7.0.2.4)
|
actionmailer (= 7.0.3)
|
||||||
actionpack (= 7.0.2.4)
|
actionpack (= 7.0.3)
|
||||||
actionview (= 7.0.2.4)
|
actionview (= 7.0.3)
|
||||||
actionview_precompiler
|
actionview_precompiler
|
||||||
active_model_serializers (~> 0.8.3)
|
active_model_serializers (~> 0.8.3)
|
||||||
activemodel (= 7.0.2.4)
|
activemodel (= 7.0.3)
|
||||||
activerecord (= 7.0.2.4)
|
activerecord (= 7.0.3)
|
||||||
activesupport (= 7.0.2.4)
|
activesupport (= 7.0.3)
|
||||||
addressable
|
addressable
|
||||||
annotate
|
annotate
|
||||||
aws-sdk-s3
|
aws-sdk-s3
|
||||||
@ -596,7 +596,7 @@ DEPENDENCIES
|
|||||||
rack-protection
|
rack-protection
|
||||||
rails_failover
|
rails_failover
|
||||||
rails_multisite
|
rails_multisite
|
||||||
railties (= 7.0.2.4)
|
railties (= 7.0.3)
|
||||||
rake
|
rake
|
||||||
rb-fsevent
|
rb-fsevent
|
||||||
rbtrace
|
rbtrace
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# This patch is a backport of https://github.com/rails/rails/pull/42350
|
|
||||||
# It fixes a bug introduced by Rails which affects reference columns marking
|
|
||||||
# them as integer instead of bigint.
|
|
||||||
#
|
|
||||||
# This should be deleted when version 7.0.3 is released.
|
|
||||||
module FreedomPatches
|
|
||||||
module ArReferencesFix
|
|
||||||
module SchemaDefinition
|
|
||||||
def index_options(table_name)
|
|
||||||
index_options = as_options(index)
|
|
||||||
|
|
||||||
# legacy reference index names are used on versions 6.0 and earlier
|
|
||||||
return index_options if options[:_uses_legacy_reference_index_name]
|
|
||||||
|
|
||||||
index_options[:name] ||= polymorphic_index_name(table_name) if polymorphic
|
|
||||||
index_options
|
|
||||||
end
|
|
||||||
|
|
||||||
ActiveRecord::ConnectionAdapters::ReferenceDefinition.prepend(self)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class ActiveRecord::Migration::Compatibility::V6_0
|
|
||||||
module TableDefinition
|
|
||||||
def references(*args, **options)
|
|
||||||
options[:_uses_legacy_reference_index_name] = true
|
|
||||||
super
|
|
||||||
end
|
|
||||||
alias :belongs_to :references
|
|
||||||
end
|
|
||||||
|
|
||||||
def add_reference(table_name, ref_name, **options)
|
|
||||||
if connection.adapter_name == "SQLite"
|
|
||||||
options[:type] = :integer
|
|
||||||
end
|
|
||||||
options[:_uses_legacy_reference_index_name] = true
|
|
||||||
super
|
|
||||||
end
|
|
||||||
alias :add_belongs_to :add_reference
|
|
||||||
|
|
||||||
def compatible_table_definition(t)
|
|
||||||
class << t
|
|
||||||
prepend TableDefinition
|
|
||||||
end
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user