Commit 19fa515a authored by Michael Kozono's avatar Michael Kozono

Merge branch '348357-fix-rake-tasks-for-multiple-databases' into 'master'

Fix rake task to setup the Geo tracking database

See merge request gitlab-org/gitlab!82340
parents c733cc7b 7b556213
...@@ -25,7 +25,7 @@ db_namespace = namespace :db do ...@@ -25,7 +25,7 @@ db_namespace = namespace :db do
ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name| ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
desc "Creates the #{name} database, loads the schema, and initializes with the seed data (use db:reset:#{name} to also drop the database first)" desc "Creates the #{name} database, loads the schema, and initializes with the seed data (use db:reset:#{name} to also drop the database first)"
task name => ["db:create:#{name}", :environment, "db:schema:load:#{name}", "db:seed"] task name => ["db:create:#{name}", :environment, "db:schema:load:#{name}", "db:seed:#{name}"]
end end
end end
...@@ -52,7 +52,7 @@ db_namespace = namespace :db do ...@@ -52,7 +52,7 @@ db_namespace = namespace :db do
desc "Loads the seed data from ee/db/geo/seeds.rb" desc "Loads the seed data from ee/db/geo/seeds.rb"
task geo: :load_config do task geo: :load_config do
db_namespace["abort_if_pending_migrations"].invoke db_namespace["abort_if_pending_migrations:geo"].invoke
ActiveRecord::Tasks::DatabaseTasks.seed_loader = seed_loader ActiveRecord::Tasks::DatabaseTasks.seed_loader = seed_loader
ActiveRecord::Tasks::DatabaseTasks.load_seed ActiveRecord::Tasks::DatabaseTasks.load_seed
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment