Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve ActiveRecord schema format deprecation #2275

Merged

Conversation

kevin-j-m
Copy link
Contributor

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:

```
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
Copy link
Contributor Author

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

@nesquena nesquena merged commit c58c43d into padrino:master Oct 28, 2023
@nesquena
Copy link
Member

Thanks!

@kevin-j-m kevin-j-m deleted the activerecord-schema-format-deprecation branch October 29, 2023 11:21
matsubara0507 added a commit to matsubara0507/padrino-framework that referenced this pull request Feb 5, 2025
matsubara0507 added a commit to matsubara0507/padrino-framework that referenced this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants