-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run
rails app:update
and resolve merge conflicts
- Loading branch information
Showing
12 changed files
with
129 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# frozen_string_literal: true | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Define an application-wide HTTP permissions policy. For further | ||
# information see https://developers.google.com/web/updates/2018/06/feature-policy | ||
# | ||
# Rails.application.config.permissions_policy do |f| | ||
# f.camera :none | ||
# f.gyroscope :none | ||
# f.microphone :none | ||
# f.usb :none | ||
# f.fullscreen :self | ||
# f.payment :self, "https://secure.example.com" | ||
# information see: https://developers.google.com/web/updates/2018/06/feature-policy | ||
|
||
# Rails.application.config.permissions_policy do |policy| | ||
# policy.camera :none | ||
# policy.gyroscope :none | ||
# policy.microphone :none | ||
# policy.usb :none | ||
# policy.fullscreen :self | ||
# policy.payment :self, "https://secure.example.com" | ||
# end |
27 changes: 27 additions & 0 deletions
27
db/migrate/20231014141511_add_service_name_to_active_storage_blobs.active_storage.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
# This migration comes from active_storage (originally 20190112182829) | ||
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] | ||
def up | ||
return unless table_exists?(:active_storage_blobs) | ||
|
||
return if column_exists?(:active_storage_blobs, :service_name) | ||
|
||
add_column :active_storage_blobs, :service_name, :string | ||
|
||
if (configured_service = ActiveStorage::Blob.service.name) | ||
# rubocop:disable Rails/SkipsModelValidation | ||
# We don't want this to fail | ||
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) | ||
# rubocop:enable Rails/SkipsModelValidation | ||
end | ||
|
||
change_column :active_storage_blobs, :service_name, :string, null: false | ||
end | ||
|
||
def down | ||
return unless table_exists?(:active_storage_blobs) | ||
|
||
remove_column :active_storage_blobs, :service_name | ||
end | ||
end |
30 changes: 30 additions & 0 deletions
30
db/migrate/20231014141512_create_active_storage_variant_records.active_storage.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
|
||
# This migration comes from active_storage (originally 20191206030411) | ||
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] | ||
def change | ||
return unless table_exists?(:active_storage_blobs) | ||
|
||
# Use Active Record's configured type for primary key | ||
create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t| | ||
t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type | ||
t.string :variation_digest, null: false | ||
|
||
t.index %i[blob_id variation_digest], name: 'index_active_storage_variant_records_uniqueness', unique: true | ||
t.foreign_key :active_storage_blobs, column: :blob_id | ||
end | ||
end | ||
|
||
private | ||
|
||
def primary_key_type | ||
config = Rails.configuration.generators | ||
config.options[config.orm][:primary_key_type] || :primary_key | ||
end | ||
|
||
def blobs_primary_key_type | ||
pkey_name = connection.primary_key(:active_storage_blobs) | ||
pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } | ||
pkey_column.bigint? ? :bigint : pkey_column.type | ||
end | ||
end |
10 changes: 10 additions & 0 deletions
10
db/migrate/20231014141513_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
# This migration comes from active_storage (originally 20211119233751) | ||
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] | ||
def change | ||
return unless table_exists?(:active_storage_blobs) | ||
|
||
change_column_null(:active_storage_blobs, :checksum, true) | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.