This method is only available on newer versions. The first available version (v7.2.3) is shown here.
record_environment()
Stores the current environment in the database.
# File activerecord/lib/active_record/migration.rb, line 1516 def record_environment return if down? @internal_metadata[:environment] = connection.pool.db_config.env_name end