Class: Textus::Surfaces::CLI::Verb::SchemaMigrate
- Inherits:
-
Textus::Surfaces::CLI::Verb
- Object
- Textus::Surfaces::CLI::Verb
- Textus::Surfaces::CLI::Verb::SchemaMigrate
- Defined in:
- lib/textus/surfaces/cli/verb/schema_migrate.rb
Instance Attribute Summary
Attributes inherited from Textus::Surfaces::CLI::Verb
Instance Method Summary collapse
Methods inherited from Textus::Surfaces::CLI::Verb
command_name, descendants, #emit, #gate_dispatch, inherited, #initialize, needs_store?, option, options, parent_group, #parse, #resolved_role
Constructor Details
This class inherits a constructor from Textus::Surfaces::CLI::Verb
Instance Method Details
#call(store) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/textus/surfaces/cli/verb/schema_migrate.rb', line 11 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 |