Sha256: 585569954581a88c301f58476ba2c86aa84eba75c6023079cb46d506fec63d07

Contents?: true

Size: 776 Bytes

Versions: 28

Compression:

Stored size: 776 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_geordi 'bundle_install'
  invoke_geordi 'yarn_install'
  Interaction.announce 'Migrating'

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

      Util.run!([Util.binstub_or_fallback('rake'), 'db:migrate', 'parallel:prepare'])
    else
      invoke_geordi 'rake', 'db:migrate'
    end
  else
    Interaction.note 'No migrations directory found.'
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
geordi-9.5.0 lib/geordi/commands/migrate.rb
geordi-9.4.1 lib/geordi/commands/migrate.rb
geordi-9.4.0 lib/geordi/commands/migrate.rb
geordi-9.3.1 lib/geordi/commands/migrate.rb
geordi-9.3.0 lib/geordi/commands/migrate.rb
geordi-9.2.0 lib/geordi/commands/migrate.rb
geordi-9.1.0 lib/geordi/commands/migrate.rb
geordi-9.0.0 lib/geordi/commands/migrate.rb
geordi-8.0.0 lib/geordi/commands/migrate.rb
geordi-7.0.2 lib/geordi/commands/migrate.rb
geordi-7.0.1 lib/geordi/commands/migrate.rb
geordi-7.0.0 lib/geordi/commands/migrate.rb
geordi-6.1.0 lib/geordi/commands/migrate.rb
geordi-6.0.1 lib/geordi/commands/migrate.rb
geordi-6.0.0 lib/geordi/commands/migrate.rb
geordi-6.0.0.pre.rc1 lib/geordi/commands/migrate.rb
geordi-5.4.0 lib/geordi/commands/migrate.rb
geordi-5.3.0 lib/geordi/commands/migrate.rb
geordi-5.2.4 lib/geordi/commands/migrate.rb
geordi-5.2.3 lib/geordi/commands/migrate.rb