Method: Migr8::RepositoryOperation#status

Defined in:
lib/migr8.rb

#statusObject



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/migr8.rb', line 409

def status
  ret = inspect()
  s = ""
  s << "## Status: #{ret[:status]}\n"
  if ret[:recent]
    s << "## Recent history:\n"
    ret[:recent].each {|mig| s << _to_line(mig) }
  end
  if ret[:missing]
    s << "## !!! The following migrations are applied to DB, but files are not found.\n"
    s << "## !!! (Try `#{File.basename($0)} unapply -x abcd1234` to unapply them.)\n"
    ret[:missing].each {|mig| s << _to_line(mig) }
  end
  return s
end