Module: Glueby::Generator::MigrateGenerator::ClassMethod

Instance Method Summary collapse

Instance Method Details

#next_migration_number(dirname) ⇒ Object



5
6
7
8
9
10
# File 'lib/glueby/generator/migrate_generator.rb', line 5

def next_migration_number(dirname)
  # ::ActiveRecord::Migration.next_migration_number(number)
  # ::ActiveRecord::Generators::Base.next_migration_number(dirname)
  next_migration_number = current_migration_number(dirname) + 1
  ::ActiveRecord::Migration.next_migration_number(next_migration_number)
end