class method self.new

Ruby on Rails 5.2.8.1

Since v5.2.8.1

Available in: v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.new(current: nil, stored: nil)

No documentation comment.

Parameters

current key = nil
stored key = nil
Source
# File activerecord/lib/active_record/migration.rb, line 171
    def initialize(current: nil, stored: nil)
      msg =  "You are attempting to modify a database that was last run in `#{ stored }` environment.\n".dup
      msg << "You are running in `#{ current }` environment. "
      msg << "If you are sure you want to continue, first set the environment using:\n\n"
      msg << "        bin/rails db:environment:set"
      if defined?(Rails.env)
        super("#{msg} RAILS_ENV=#{::Rails.env}\n\n")
      else
        super("#{msg}\n\n")
      end
    end

Defined in activerecord/lib/active_record/migration.rb line 171 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::EnvironmentMismatchError

Type at least 2 characters to search.

↑↓ navigate · open · esc close