padrino / padrino-framework

Padrino is a full-stack ruby framework built upon Sinatra.
http://www.padrinorb.com
MIT License
3.37k stars 508 forks source link

Resolve ActiveRecord schema format deprecation #2275

Closed kevin-j-m closed 1 year ago

kevin-j-m commented 1 year ago

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.

kevin-j-m commented 1 year ago

The test suite failures are unrelated, but addressed in #2276.

nesquena commented 1 year ago

Thanks!