Use db:schema instead of db:structure rake task
What does this MR do and why?
The db:structure
rake task is deprecated in favor of db:schema
and is going to be removed in Rails 7. Currently, Rails 7 CI fails with this error: https://gitlab.com/gitlab-org/gitlab/-/jobs/3852499876#L103
Don't know how to build task 'db:structure:load:ci' (See the list of available tasks with `rake --tasks`)
Did you mean? db:schema:load:ci
Since config.active_record.schema_format
is specified to :sql
, db:schema
should behave just like db:structure
. With this change, the job is successfully executed for the current version of Rails:
- https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/3886712751
- https://gitlab.com/gitlab-org/gitlab-qa/-/jobs/3886712770
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by George Koltsov