Sha256: 1e67e00cb6fa67a72d240c5675b0200dd966bb797edde7c77ef169d13abfa32a

Contents?: true

Size: 389 Bytes

Versions: 35

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

if defined?(ActiveRecord::Base)
  begin
    ActiveRecord::Migration.maintain_test_schema!
  rescue ActiveRecord::PendingMigrationError => e
    puts e.to_s.strip
    exit 1
  end

  if Rails.configuration.eager_load
    ActiveRecord::Base.descendants.each do |model|
      model.load_schema if !model.abstract_class? && model.table_exists?
    end
  end
end

Version data entries

35 entries across 35 versions & 5 rubygems

Version Path
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/railties-7.1.3.4/lib/rails/testing/maintain_test_schema.rb
railties-8.0.1 lib/rails/testing/maintain_test_schema.rb
railties-8.0.0.1 lib/rails/testing/maintain_test_schema.rb
railties-7.2.2.1 lib/rails/testing/maintain_test_schema.rb
railties-7.1.5.1 lib/rails/testing/maintain_test_schema.rb
railties-8.0.0 lib/rails/testing/maintain_test_schema.rb
railties-7.2.2 lib/rails/testing/maintain_test_schema.rb
railties-7.1.5 lib/rails/testing/maintain_test_schema.rb
railties-8.0.0.rc2 lib/rails/testing/maintain_test_schema.rb
railties-7.2.1.2 lib/rails/testing/maintain_test_schema.rb
railties-7.1.4.2 lib/rails/testing/maintain_test_schema.rb
railties-8.0.0.rc1 lib/rails/testing/maintain_test_schema.rb
railties-7.2.1.1 lib/rails/testing/maintain_test_schema.rb
railties-7.1.4.1 lib/rails/testing/maintain_test_schema.rb
railties-8.0.0.beta1 lib/rails/testing/maintain_test_schema.rb
omg-railties-8.0.0.alpha9 lib/rails/testing/maintain_test_schema.rb
omg-railties-8.0.0.alpha8 lib/rails/testing/maintain_test_schema.rb
omg-railties-8.0.0.alpha7 lib/rails/testing/maintain_test_schema.rb
omg-railties-8.0.0.alpha4 lib/rails/testing/maintain_test_schema.rb
omg-railties-8.0.0.alpha3 lib/rails/testing/maintain_test_schema.rb