Module: Argos::MigrationNumberHelper

Included in:
InstallGenerator, UserGenerator
Defined in:
lib/generators/argos/migration_number_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) next_migration_number(path)



4
5
6
7
8
9
10
11
# File 'lib/generators/argos/migration_number_helper.rb', line 4

def next_migration_number(path)
  unless @prev_migration_nr
    @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
  else
    @prev_migration_nr += 1
  end
  @prev_migration_nr.to_s
end