Class: Migr8::Actions::DownAction
Constant Summary collapse
- NAME =
"down"- DESC =
"unapply current migration"- OPTS =
[ "-n N : unapply N migrations", "--ALL : unapply all migrations", ]
- ARGS =
nil
Instance Method Summary collapse
Methods inherited from Action
#cmdopterr, find_by_name, #get_command, inherited, #parse, #parser, #repository, #short_usage, subclasses, #usage
Instance Method Details
#run(options, args) ⇒ Object
1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 |
# File 'lib/migr8.rb', line 1729 def run(, args) n = 1 if ['n'] n = ['n'].to_i elsif ['ALL'] n = nil end # op = RepositoryOperation.new(repository()) _wrap do op.downgrade(n) end end |