Truncate Legacy Tables should error on multiple-shared databases
What does this MR do and why?
The truncate tables rake tasks should error with clear error message when it tries to run on shared database setup.
Detailed information in the issue: #375048 (closed)
How to set up and validate locally
Run your local gitlab in shared database setup
config/database.yml
should be something like this
development:
main:
database: gitlabhq_development
ci:
database: gitlabhq_development
database_tasks: false
Run both the rake tasks rake gitlab:db:truncate_legacy_tables:main
and rake gitlab:db:truncate_legacy_tables:ci
. You should get the error message "Cannot truncate legacy tables in single-db setup"
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.
Related to #375048 (closed)