Fix deprecation warning for db:structure:dump in db:migrate when using sql schema format
|Assignee:||Go MAEDA||% Done:|
sql schema format shows the deprecation warning:
DEPRECATION WARNING: Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump` instead. (called from block (3 levels) in <top (required)> at lib/tasks/redmine.rake:160)
db:schema/structures:dump to dump plugins migrations.
Dmitry Makurin wrote:
I guess we need to provide backward compatibility for Rails 6.1.
db:structure:dumpwill be removed only in Rails 7.0 but the current trunk works on 6.1+.
Attaching a new patch 38199_v2.patch.
I think the first patch work with Rails 6.1. It seems that
db:schema:dump generates db/structure.sql also with Rails 6.1.
$ rm db/structure.sql ls db/structure.sql ls: db/structure.sql: No such file or directory $ bin/rake redmine:plugins:migrate $ ls db/structure.sql db/structure.sql
#9 Updated by Go MAEDA about 5 hours ago
- Subject changed from Fix "DEPRECATION WARNING: Using `bin/rails db:structure:dump`" when migrating plugins using sql schema format to Fix deprecation warning for db:structure:dump in db:migrate when using sql schema format
- Status changed from Confirmed to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the fix. Thank you.