Sha256: 648ebc4df828a662d38d453aabe52b7e3b22a28990c30c62ab971f7ab6f92f50
Contents?: true
Size: 500 Bytes
Versions: 26
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module Motor module Generators module Migration def next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 if ::ActiveRecord::Base.try(:timestamped_migrations) || ::ActiveRecord.try(:timestamped_migrations) [Time.now.utc.strftime('%Y%m%d%H%M%S'), format('%.14d', next_migration_number)].max else format('%.3d', next_migration_number) end end end end end
Version data entries
26 entries across 26 versions & 4 rubygems