method
last_stored_environment
v7.0.0 -
Show latest stable
- Class:
ActiveRecord::MigrationContext
last_stored_environment()public
No documentation available.
# File activerecord/lib/active_record/migration.rb, line 1197
def last_stored_environment # :nodoc:
return nil unless ActiveRecord::InternalMetadata.enabled?
return nil if current_version == 0
raise NoEnvironmentInSchemaError unless ActiveRecord::InternalMetadata.table_exists?
environment = ActiveRecord::InternalMetadata[:environment]
raise NoEnvironmentInSchemaError unless environment
environment
end