Refactor decomposition migration to use Backup::DatabaseConfiguration
What does this MR do and why?
During the refactor of !137454 (merged) a parallel work
happened to create a script for the database decomposition (!135585 (merged)) that relied on the Backup::DatabaseModel
which
was refactored into Backup::DatabaseConfiguration
and Backup::DatabaseConnection
.
For some reason the regular MR flow did not catch this and both were eventually merged to master
.
The Backup::DatabaseModel
was then restored in : !139939 (merged) to ensure
master
was again functional.
This MR refactors the decomposition migration to use the newly refactored classes and remove again the Backup::DatabaseModel
.
Related to: #435529 (closed)
How to set up and validate locally
Using GDK:
- Modify
database.yml
: comment outci
section (so Rails is using a single database) - Drop and create ci database
gdk psql -c "DROP DATABASE gitlabhq_development_ci";gdk psql -c "CREATE DATABASE gitlabhq_development_ci"
- Run the rake task:
bundle exec rake gitlab:db:decomposition:migrate
- Verify CI database now also have projects:
gdk psql -d gitlabhq_development -c "SELECT COUNT(*) FROM projects";gdk psql -d gitlabhq_development_ci -c "SELECT COUNT(*) FROM projects";
should match
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.