Skip to content

Remove rake task to set up EE specific database functionality

What does this MR do and why?

Remove the rake task to set up EE-specific database functionality to avoid recreating the Geo tracking database twice. Geo now uses the Rails built-in support for multiple databases, and the tracking database settings are in the regular config/database.yml file. So, running the standard Rails rake tasks to set up the database will also set up the Geo tracking database.

Screenshots or screen recordings

> bundle exec rake db:drop db:create db:structure:load db:migrate gitlab:db:setup_ee
Dropped database 'gitlabhq_test'
Dropped database 'gitlabhq_test_ci'
Dropped database 'gitlabhq_geo_test'
Created database 'gitlabhq_test'
Created database 'gitlabhq_test_ci'
Created database 'gitlabhq_geo_test'
DEPRECATION WARNING: Using `bin/rails db:structure:load` is deprecated and will be removed in Rails 6.2. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead. (called from load at /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/bin/rake:23)
Dropped database 'gitlabhq_geo_test'
Created database 'gitlabhq_geo_test'
==> 'bundle exec rake db:drop db:create db:structure:load db:migrate gitlab:db:setup_ee' succeeded in 44 seconds.

How to set up and validate locally

  1. Enable Geo in your GDK
  2. In a console session run
    $ RAILS_ENV=test bundle exec rake db:drop db:create db:structure:load db:migrate
  3. Both main and Geo databases will be reset

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports