Class: StandaloneMigrations::Tasks

Inherits:
Object
  • Object
show all
Defined in:
lib/standalone_migrations/tasks.rb

Defined Under Namespace

Classes: Deprecations

Class Method Summary collapse

Class Method Details

.configureObject



4
5
6
7
8
9
# File 'lib/standalone_migrations/tasks.rb', line 4

def configure
  Deprecations.new.call
  config_database_file = Configurator.new.config
  paths = Rails.application.config.paths
  paths.add "config/database", :with => config_database_file
end

.load_tasksObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/standalone_migrations/tasks.rb', line 11

def load_tasks
  configure

  MinimalRailtieConfig.load_tasks
  %w(
    connection
    environment
    db/new_migration
  ).each do
    |task| load "standalone_migrations/tasks/#{task}.rake"
  end
  load "active_record/railties/databases.rake"
end