Class: Textus::CLI::Verb::SchemaMigrate

Inherits:
Textus::CLI::Verb show all
Defined in:
lib/textus/cli/verb/schema_migrate.rb

Instance Attribute Summary

Attributes inherited from Textus::CLI::Verb

#positional

Instance Method Summary collapse

Methods inherited from Textus::CLI::Verb

#emit, inherited, #initialize, needs_store?, option, options, #parse

Constructor Details

This class inherits a constructor from Textus::CLI::Verb

Instance Method Details

#call(store) ⇒ Object

Raises:



7
8
9
10
11
12
# File 'lib/textus/cli/verb/schema_migrate.rb', line 7

def call(store)
  name = positional.shift or raise UsageError.new("schema migrate NAME")
  raise UsageError.new("schema migrate requires --rename=OLD:NEW") unless rename

  emit(Textus::Schema::Tools.migrate(store, name: name, rename: rename))
end