Running the ar:migrate task with ActiveRecord 7.0 will provide the following deprecation warning:
DEPRECATION WARNING: ActiveRecord::Base.schema_format is deprecated and will be removed in Rails 7.1.
Use `ActiveRecord.schema_format` instead.
Now that 7.1 is released, ActiveRecord::Base.schema_format has been removed in the latest version of ActiveRecord.
This checks to see if at least ActiveRecord version 7.0 is being used. If not, there is no change to the task. However, if so, it now uses ActiveRecord.schema_format to check if the schema dump task should be invoked.
Running the
ar:migrate
task with ActiveRecord 7.0 will provide the following deprecation warning:Now that 7.1 is released,
ActiveRecord::Base.schema_format
has been removed in the latest version of ActiveRecord.This checks to see if at least ActiveRecord version 7.0 is being used. If not, there is no change to the task. However, if so, it now uses
ActiveRecord.schema_format
to check if the schema dump task should be invoked.