Update to rails 6.1.3.2

This commit is contained in:
Tom Hughes 2020-12-10 14:44:37 +00:00
parent c3cc8ea541
commit a71b8af4d1
16 changed files with 309 additions and 103 deletions

View file

@ -1,7 +1,7 @@
source "https://rubygems.org"
# Require rails
gem "rails", "6.0.3.7"
gem "rails", "6.1.3.2"
# Require json for multi_json
gem "json"
@ -40,7 +40,7 @@ gem "active_record_union"
gem "bootstrap", "~> 4.5.0"
gem "bootstrap_form", "~> 4.0"
gem "cancancan"
gem "composite_primary_keys", "~> 12.0.0"
gem "composite_primary_keys", "~> 13.0.0"
gem "config"
gem "delayed_job_active_record"
gem "http_accept_language", "~> 2.1.1"

View file

@ -3,67 +3,71 @@ GEM
specs:
aasm (5.2.0)
concurrent-ruby (~> 1.0)
actioncable (6.0.3.7)
actionpack (= 6.0.3.7)
actioncable (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
actionmailbox (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
mail (>= 2.7.1)
actionmailer (6.0.3.7)
actionpack (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
actionmailer (6.1.3.2)
actionpack (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activesupport (= 6.1.3.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.7)
actionview (= 6.0.3.7)
activesupport (= 6.0.3.7)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.3.2)
actionview (= 6.1.3.2)
activesupport (= 6.1.3.2)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionpack-page_caching (1.2.3)
actionpack (>= 5.0.0)
actiontext (6.0.3.7)
actionpack (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
actiontext (6.1.3.2)
actionpack (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
nokogiri (>= 1.8.5)
actionview (6.0.3.7)
activesupport (= 6.0.3.7)
actionview (6.1.3.2)
activesupport (= 6.1.3.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_record_union (1.3.0)
activerecord (>= 4.0)
activejob (6.0.3.7)
activesupport (= 6.0.3.7)
activejob (6.1.3.2)
activesupport (= 6.1.3.2)
globalid (>= 0.3.6)
activemodel (6.0.3.7)
activesupport (= 6.0.3.7)
activerecord (6.0.3.7)
activemodel (= 6.0.3.7)
activesupport (= 6.0.3.7)
activemodel (6.1.3.2)
activesupport (= 6.1.3.2)
activerecord (6.1.3.2)
activemodel (= 6.1.3.2)
activesupport (= 6.1.3.2)
activerecord-import (1.0.8)
activerecord (>= 3.2)
activestorage (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activesupport (= 6.1.3.2)
marcel (~> 1.0.0)
activesupport (6.0.3.7)
mini_mime (~> 1.0.2)
activesupport (6.1.3.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
annotate (3.1.1)
@ -129,8 +133,8 @@ GEM
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
composite_primary_keys (12.0.10)
activerecord (~> 6.0.0)
composite_primary_keys (13.0.0)
activerecord (~> 6.1.0)
concurrent-ruby (1.1.8)
config (3.1.0)
deep_merge (~> 1.2, >= 1.2.1)
@ -263,7 +267,7 @@ GEM
maxminddb (0.1.22)
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.1.0)
mini_mime (1.0.3)
mini_portile2 (2.5.1)
minitest (5.14.4)
msgpack (1.4.2)
@ -344,20 +348,20 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-uri_sanitizer (0.0.2)
rails (6.0.3.7)
actioncable (= 6.0.3.7)
actionmailbox (= 6.0.3.7)
actionmailer (= 6.0.3.7)
actionpack (= 6.0.3.7)
actiontext (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
activemodel (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
bundler (>= 1.3.0)
railties (= 6.0.3.7)
rails (6.1.3.2)
actioncable (= 6.1.3.2)
actionmailbox (= 6.1.3.2)
actionmailer (= 6.1.3.2)
actionpack (= 6.1.3.2)
actiontext (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activemodel (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
bundler (>= 1.15.0)
railties (= 6.1.3.2)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
@ -371,12 +375,12 @@ GEM
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.0.3.7)
actionpack (= 6.0.3.7)
activesupport (= 6.0.3.7)
railties (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
rb-fsevent (0.11.0)
@ -448,10 +452,9 @@ GEM
strong_migrations (0.7.6)
activerecord (>= 5)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.0.0)
@ -491,7 +494,7 @@ DEPENDENCIES
cancancan
canonical-rails
capybara (>= 2.15)
composite_primary_keys (~> 12.0.0)
composite_primary_keys (~> 13.0.0)
config
dalli
debug_inspector
@ -533,7 +536,7 @@ DEPENDENCIES
r2 (~> 0.2.7)
rack-cors
rack-uri_sanitizer
rails (= 6.0.3.7)
rails (= 6.1.3.2)
rails-controller-testing
rails-i18n (~> 6.0.0)
rinku (>= 2.0.6)

View file

@ -9,8 +9,8 @@ def system!(*args)
end
FileUtils.chdir APP_ROOT do
# This script is a way to setup or update your development environment automatically.
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
# This script is a way to set up or update your development environment automatically.
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.
puts "== Installing dependencies =="
@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do
system("bundle check") || system!("bundle install")
# Install JavaScript dependencies
# system('bin/yarn')
system! "bin/yarn"
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')

View file

@ -1,9 +1,17 @@
#!/usr/bin/env ruby
APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
yarn = ENV["PATH"].split(File::PATH_SEPARATOR)
.reject { |dir| File.expand_path(dir) == __dir__ }
.product(["yarnpkg", "yarn", "yarn.cmd", "yarn.ps1"])
.map { |dir, file| File.expand_path(file, dir) }
.find { |file| File.executable?(file) }
if yarn
exec yarn, *ARGV
else
warn "Yarn executable was not detected in the system."
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
end

View file

@ -3,3 +3,4 @@
require_relative "config/environment"
run Rails.application
Rails.application.load_server

View file

@ -2,7 +2,7 @@ development:
adapter: async
test:
adapter: async
adapter: test
production:
adapter: redis

View file

@ -1,8 +1,10 @@
require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
@ -39,6 +41,12 @@ Rails.application.configure do
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load unless Settings.status == "database_offline"
@ -59,10 +67,16 @@ Rails.application.configure do
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
# Disable host validation.
config.hosts = []
end

View file

@ -1,3 +1,5 @@
require "active_support/core_ext/integer/time"
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@ -30,7 +32,7 @@ Rails.application.configure do
config.assets.compile = false
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# config.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
@ -47,8 +49,8 @@ Rails.application.configure do
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
# Include generic and useful information about system operation, but avoid logging too much
# information to avoid inadvertent exposure of personally identifiable information (PII).
config.log_level = :info
# Prepend all log lines with the following tags.
@ -73,9 +75,19 @@ Rails.application.configure do
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Log disallowed deprecations.
config.active_support.disallowed_deprecation = :log
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new

View file

@ -1,3 +1,5 @@
require "active_support/core_ext/integer/time"
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
@ -43,12 +45,21 @@ Rails.application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Export translations automatically.
config.middleware.use I18n::JS::Middleware
# Raises error for missing translations.
config.action_view.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Use the test adapter for ActiveJob during testing.
config.active_job.queue_adapter = :test
end

View file

@ -1,7 +1,8 @@
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]

View file

@ -1,4 +1,6 @@
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password, :pass_crypt, :pass_crypt_confirmation]
Rails.application.config.filter_parameters += [
:password, :pass_crypt, :pass_crypt_confirmation
]

View file

@ -0,0 +1,67 @@
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 6.1 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Support for inversing belongs_to -> has_many Active Record associations.
# Rails.application.config.active_record.has_many_inversing = true
# Track Active Storage variants in the database.
# Rails.application.config.active_storage.track_variants = true
# Apply random variation to the delay when retrying failed jobs.
# Rails.application.config.active_job.retry_jitter = 0.15
# Stop executing `after_enqueue`/`after_perform` callbacks if
# `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
# Specify cookies SameSite protection level: either :none, :lax, or :strict.
#
# This change is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 6.1.
# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
# Generate CSRF tokens that are encoded in URL-safe Base64.
#
# This change is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 6.1.
# Rails.application.config.action_controller.urlsafe_csrf_tokens = true
# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
# UTC offset or a UTC time.
# ActiveSupport.utc_to_local_returns_utc_offset_times = true
# Change the default HTTP status code to `308` when redirecting non-GET/HEAD
# requests to HTTPS in `ActionDispatch::SSL` middleware.
# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
# Use new connection handling API. For most applications this won't have any
# effect. For applications using multiple databases, this new API provides
# support for granular connection swapping.
# Rails.application.config.active_record.legacy_connection_handling = false
# Make `form_with` generate non-remote forms by default.
# Rails.application.config.action_view.form_with_generates_remote_forms = false
# Set the default queue name for the analysis job to the queue adapter default.
# Rails.application.config.active_storage.queues.analysis = nil
# Set the default queue name for the purge job to the queue adapter default.
# Rails.application.config.active_storage.queues.purge = nil
# Set the default queue name for the incineration job to the queue adapter default.
# Rails.application.config.action_mailbox.queues.incineration = nil
# Set the default queue name for the routing job to the queue adapter default.
# Rails.application.config.action_mailbox.queues.routing = nil
# Set the default queue name for the mail deliver job to the queue adapter default.
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
# Generate a `Link` header that gives a hint to modern browsers about
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
# Rails.application.config.action_view.preload_links_header = true

View file

@ -0,0 +1,13 @@
# This migration comes from active_storage (originally 20190112182829)
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
def up
unless column_exists?(:active_storage_blobs, :service_name)
add_column :active_storage_blobs, :service_name, :string, :null => false, :default => ActiveStorage::Blob.service.name
change_column :active_storage_blobs, :service_name, :string, :null => false, :default => nil
end
end
def down
remove_column :active_storage_blobs, :service_name
end
end

View file

@ -0,0 +1,12 @@
# This migration comes from active_storage (originally 20191206030411)
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
def change
create_table :active_storage_variant_records do |t|
t.belongs_to :blob, :null => false, :index => false
t.string :variation_digest, :null => false
t.index [:blob_id, :variation_digest], :name => "index_active_storage_variant_records_uniqueness", :unique => true
t.foreign_key :active_storage_blobs, :column => :blob_id
end
end
end

View file

@ -1,5 +1,6 @@
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
@ -8,20 +9,6 @@ SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- Name: btree_gist; Type: EXTENSION; Schema: -; Owner: -
--
@ -165,7 +152,7 @@ $$;
--
CREATE FUNCTION public.xid_to_int4(t xid) RETURNS integer
LANGUAGE plpgsql STRICT
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
DECLARE
tl bigint;
@ -186,7 +173,7 @@ $$;
SET default_tablespace = '';
SET default_with_oids = false;
SET default_table_access_method = heap;
--
-- Name: acls; Type: TABLE; Schema: public; Owner: -
@ -266,7 +253,8 @@ CREATE TABLE public.active_storage_blobs (
metadata text,
byte_size bigint NOT NULL,
checksum character varying NOT NULL,
created_at timestamp without time zone NOT NULL
created_at timestamp without time zone NOT NULL,
service_name character varying NOT NULL
);
@ -289,6 +277,36 @@ CREATE SEQUENCE public.active_storage_blobs_id_seq
ALTER SEQUENCE public.active_storage_blobs_id_seq OWNED BY public.active_storage_blobs.id;
--
-- Name: active_storage_variant_records; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.active_storage_variant_records (
id bigint NOT NULL,
blob_id bigint NOT NULL,
variation_digest character varying NOT NULL
);
--
-- Name: active_storage_variant_records_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.active_storage_variant_records_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: active_storage_variant_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.active_storage_variant_records_id_seq OWNED BY public.active_storage_variant_records.id;
--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
--
@ -320,6 +338,7 @@ CREATE TABLE public.changeset_comments (
--
CREATE SEQUENCE public.changeset_comments_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -421,6 +440,7 @@ CREATE TABLE public.client_applications (
--
CREATE SEQUENCE public.client_applications_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -846,6 +866,7 @@ CREATE TABLE public.issue_comments (
--
CREATE SEQUENCE public.issue_comments_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -885,6 +906,7 @@ CREATE TABLE public.issues (
--
CREATE SEQUENCE public.issues_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -997,6 +1019,7 @@ CREATE TABLE public.note_comments (
--
CREATE SEQUENCE public.note_comments_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1032,6 +1055,7 @@ CREATE TABLE public.notes (
--
CREATE SEQUENCE public.notes_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1064,6 +1088,7 @@ CREATE TABLE public.oauth_nonces (
--
CREATE SEQUENCE public.oauth_nonces_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1112,6 +1137,7 @@ CREATE TABLE public.oauth_tokens (
--
CREATE SEQUENCE public.oauth_tokens_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1146,6 +1172,7 @@ CREATE TABLE public.redactions (
--
CREATE SEQUENCE public.redactions_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1220,6 +1247,7 @@ CREATE TABLE public.reports (
--
CREATE SEQUENCE public.reports_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1266,6 +1294,7 @@ CREATE TABLE public.user_blocks (
--
CREATE SEQUENCE public.user_blocks_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1310,6 +1339,7 @@ CREATE TABLE public.user_roles (
--
CREATE SEQUENCE public.user_roles_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
@ -1471,6 +1501,13 @@ ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT n
ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass);
--
-- Name: active_storage_variant_records id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records ALTER COLUMN id SET DEFAULT nextval('public.active_storage_variant_records_id_seq'::regclass);
--
-- Name: changeset_comments id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1670,6 +1707,14 @@ ALTER TABLE ONLY public.active_storage_blobs
ADD CONSTRAINT active_storage_blobs_pkey PRIMARY KEY (id);
--
-- Name: active_storage_variant_records active_storage_variant_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records
ADD CONSTRAINT active_storage_variant_records_pkey PRIMARY KEY (id);
--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -2224,6 +2269,13 @@ CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON public.active
CREATE UNIQUE INDEX index_active_storage_blobs_on_key ON public.active_storage_blobs USING btree (key);
--
-- Name: index_active_storage_variant_records_uniqueness; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_active_storage_variant_records_uniqueness ON public.active_storage_variant_records USING btree (blob_id, variation_digest);
--
-- Name: index_changeset_comments_on_changeset_id_and_created_at; Type: INDEX; Schema: public; Owner: -
--
@ -2750,6 +2802,14 @@ ALTER TABLE ONLY public.diary_entry_subscriptions
ADD CONSTRAINT diary_entry_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: active_storage_variant_records fk_rails_993965df05; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records
ADD CONSTRAINT fk_rails_993965df05 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);
--
-- Name: active_storage_attachments fk_rails_c3b3935057; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -3124,6 +3184,8 @@ INSERT INTO "schema_migrations" (version) VALUES
('20201006213836'),
('20201006220807'),
('20201214144017'),
('20210510083027'),
('20210510083028'),
('20210511104518'),
('21'),
('22'),

View file

@ -60,7 +60,7 @@ class UserHelperTest < ActionView::TestCase
gravatar_user = create(:user, :image_use_gravatar => true)
url = user_image_url(user)
assert_match %r{^http://test.host/rails/active_storage/representations/[^/]+/[^/]+/a.gif$}, url
assert_match %r{^http://test.host/rails/active_storage/representations/redirect/[^/]+/[^/]+/a.gif$}, url
url = user_image_url(gravatar_user)
assert_match %r{^http://www.gravatar.com/avatar/}, url