-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In Rails 6.1 the tasks used for database setup in our test pack were deprecated. They were removed in Rails 7 https://edgeguides.rubyonrails.org/7_0_release_notes.html. This commit moves to specialize the tasks for Rails7+ to use `db:schema:load` per deprecation instruction: ``` DEPRECATION WARNING: Using `bin/rails db:schema:load_if_ruby` is deprecated and will be removed in Rails 7.0. Configure the format using `config.active_record.schema_format = :ruby` to use `schema.rb` and run `bin/rails db:schema:load` instead. (called from <main> at /app/bin/rake:4) ```
- Loading branch information
Showing
5 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Opens up the class of the Rails7 language pack and | ||
# overwrites methods defined in `language_pack/test/ruby.rb` or `language_pack/test/rails2.rb` | ||
class LanguagePack::Rails7 | ||
# Rails removed the db:schema:load_if_ruby and `db:structure:load_if_sql` tasks | ||
# they've been replaced by `db:schema:load` instead | ||
def db_prepare_test_rake_tasks | ||
["db:schema:load", "db:migrate"].map {|name| rake.task(name) } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters