Class: Apartment::CLI::Migrations

Inherits:
Thor
  • Object
show all
Defined in:
lib/apartment/cli/migrations.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


8
# File 'lib/apartment/cli/migrations.rb', line 8

def self.exit_on_failure? = true

Instance Method Details

#migrate(tenant = nil) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/apartment/cli/migrations.rb', line 22

def migrate(tenant = nil)
  require('apartment/migrator')

  if tenant
    migrate_single(tenant)
  else
    migrate_all
  end
end

#rollback(tenant = nil) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/apartment/cli/migrations.rb', line 38

def rollback(tenant = nil)
  if tenant
    rollback_single(tenant)
  else
    rollback_all
  end
end