Sha256: eaef1f0cc187fb487d1ad8dfafc551203189c617f40aecc4642ecbb0312a5e34

Contents?: true

Size: 678 Bytes

Versions: 33

Compression:

Stored size: 678 Bytes

Contents

desc 'migrate', 'Migrate all databases'
long_desc <<-LONGDESC
Example: `geordi migrate`

If you are using `parallel_tests`, this runs migrations in your development
environment and `rake parallel:prepare` afterwards. Otherwise, invokes `geordi rake`
with `db:migrate`.
LONGDESC

def migrate
  invoke_cmd 'bundle_install'
  announce 'Migrating'

  if File.directory?('db/migrate')
    if file_containing?('Gemfile', /parallel_tests/)
      note 'Development and parallel test databases'
      puts

      Util.system! 'bundle exec rake db:migrate parallel:prepare'
    else
      invoke_cmd 'rake', 'db:migrate'
    end
  else
    note 'No migrations directory found.'
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
geordi-1.9.0 lib/geordi/commands/migrate.rb
geordi-1.8.0 lib/geordi/commands/migrate.rb
geordi-1.7.1 lib/geordi/commands/migrate.rb
geordi-1.7.0 lib/geordi/commands/migrate.rb
geordi-1.6.5 lib/geordi/commands/migrate.rb
geordi-1.6.4 lib/geordi/commands/migrate.rb
geordi-1.6.3 lib/geordi/commands/migrate.rb
geordi-1.6.2 lib/geordi/commands/migrate.rb
geordi-1.6.1 lib/geordi/commands/migrate.rb
geordi-1.6.0 lib/geordi/commands/migrate.rb
geordi-1.5.2 lib/geordi/commands/migrate.rb
geordi-1.5.1 lib/geordi/commands/migrate.rb
geordi-1.5.0 lib/geordi/commands/migrate.rb
geordi-1.4.3 lib/geordi/commands/migrate.rb
geordi-1.4.2 lib/geordi/commands/migrate.rb
geordi-1.4.1 lib/geordi/commands/migrate.rb
geordi-1.4.0 lib/geordi/commands/migrate.rb
geordi-1.3.2 lib/geordi/commands/migrate.rb
geordi-1.3.1 lib/geordi/commands/migrate.rb
geordi-1.3.0 lib/geordi/commands/migrate.rb