diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
commit | e1b255aca456a5b456111b09237805fd32d15111 (patch) | |
tree | a87c8b8989449a9dbdf1c6897901f6957ec021dc /activerecord/lib/rails/generators/active_record.rb | |
parent | 60ab54113fa833a1258d687673561b9474964149 (diff) | |
parent | a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 (diff) | |
download | rails-e1b255aca456a5b456111b09237805fd32d15111.tar.gz rails-e1b255aca456a5b456111b09237805fd32d15111.tar.bz2 rails-e1b255aca456a5b456111b09237805fd32d15111.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord/lib/rails/generators/active_record.rb')
-rw-r--r-- | activerecord/lib/rails/generators/active_record.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/rails/generators/active_record.rb b/activerecord/lib/rails/generators/active_record.rb index 1ca838b4f2..d2b1e86857 100644 --- a/activerecord/lib/rails/generators/active_record.rb +++ b/activerecord/lib/rails/generators/active_record.rb @@ -19,10 +19,11 @@ module ActiveRecord # Implement the required interface for Rails::Generators::Migration. # def self.next_migration_number(dirname) #:nodoc: + next_migration_number = current_migration_number(dirname) + 1 if ActiveRecord::Base.timestamped_migrations - Time.now.utc.strftime("%Y%m%d%H%M%S") + [Time.now.utc.strftime("%Y%m%d%H%M%S"), "%.14d" % next_migration_number].max else - "%.3d" % (current_migration_number(dirname) + 1) + "%.3d" % next_migration_number end end end |