Class: Jets::Commands::Db

Inherits:
Base show all
Defined in:
lib/jets/commands/db.rb

Defined Under Namespace

Classes: Tasks

Instance Method Summary collapse

Methods inherited from Base

autocomplete, banner, dispatch, eager_load!, help_list, inherited, klass_from_namespace, namespace_from_class, namespaced_commands, perform, subclasses

Instance Method Details

#generate(*args) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/jets/commands/db.rb', line 5

def generate(*args)
  require "rails/generators"
  require "rails/generators/active_record/migration/migration_generator"

  generator = ActiveRecord::Generators::MigrationGenerator.new(args)
  generator.create_migration_file
end