standalone-migrations icon indicating copy to clipboard operation
standalone-migrations copied to clipboard

db/config.yml is required in the moment the tasks are loaded.

Open salzig opened this issue 6 years ago • 0 comments

db/config.yml is required in the moment the tasks are loaded.

I tend to use a rake task like the following to setup development environments, without having having the actually used config under version control.

namespace :dev do
  desc 'Setup Dev Environment'
  task setup: 'db/config.yml'

  # one rule to rule them all. Copy any .yml.example to matching .yml
  rule '.yml' => '.yml.example' do |task|
    cp task.source, task.name
  end
end

Sadly StandaloneMigrations::Tasks.load_tasks will fail with a missing db/config.yml, so i can't run my dev:setup tasks, which would create the file.

Would be awesome if the db/config.yml would only be required when the tasks are executed, not just loaded.

salzig avatar Feb 19 '19 12:02 salzig