instance method
next_migration_number
Ruby on Rails 8.1.2
Since v3.1.12Signature
next_migration_number(number)
Determines the version number of the next migration.
Parameters
-
numberreq
Source
# File activerecord/lib/active_record/migration.rb, line 1133
def next_migration_number(number)
if ActiveRecord.timestamped_migrations
[Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % number].max
else
"%.3d" % number.to_i
end
end
Defined in activerecord/lib/active_record/migration.rb line 1133
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Migration