Skip to content
代码片段 群组 项目
提交 6fd5dc26 编辑于 作者: Thong Kuah's avatar Thong Kuah
浏览文件

Teach scripts/db_tasks to know about database_tasks:false

This script attempts to append :main if there's only one DB effectively.
To make this work in the case where we have two connections to main, we
need to reject ci config where database_tasks: false.
上级 0065cda2
No related branches found
No related tags found
无相关合并请求
...@@ -5,6 +5,7 @@ require 'yaml' ...@@ -5,6 +5,7 @@ require 'yaml'
rails_env = ENV.fetch('RAILS_ENV') rails_env = ENV.fetch('RAILS_ENV')
database_config = YAML.load_file(File.join(File.expand_path('..', __dir__), 'config', 'database.yml'))[rails_env] database_config = YAML.load_file(File.join(File.expand_path('..', __dir__), 'config', 'database.yml'))[rails_env]
database_config.reject! { |_k, v| v["database_tasks"] == false }
task = ARGV.shift task = ARGV.shift
raise ArgumentError, 'You need to pass a task name!' unless task raise ArgumentError, 'You need to pass a task name!' unless task
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册