Sha256: 6426afc09b157e0761f2f79ad59fc08d58cab7cf713a8f44148cb5401e6ebad0

Contents?: true

Size: 490 Bytes

Versions: 273

Compression:

Stored size: 490 Bytes

Contents

module ActiveRecord
  module Generators
    module Migration
      # Implement the required interface for Rails::Generators::Migration.
      def 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"), "%.14d" % next_migration_number].max
        else
          "%.3d" % next_migration_number
        end
      end
    end
  end
end

Version data entries

273 entries across 242 versions & 18 rubygems

Version Path
activerecord-3.0.19 lib/rails/generators/active_record/migration.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.10/lib/rails/generators/active_record/migration.rb
challah-0.9.0 vendor/bundle/gems/activerecord-3.2.9/lib/rails/generators/active_record/migration.rb
activerecord-3.2.10 lib/rails/generators/active_record/migration.rb
activerecord-3.1.9 lib/rails/generators/active_record/migration.rb
activerecord-3.0.18 lib/rails/generators/active_record/migration.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/activerecord-3.1.1/lib/rails/generators/active_record/migration.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/activerecord-3.1.1/lib/rails/generators/active_record/migration.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/activerecord-3.1.1/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/activerecord-3.2.8/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/activerecord-3.2.7/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/activerecord-3.2.7/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/activerecord-3.2.8/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/activerecord-3.2.9/lib/rails/generators/active_record/migration.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/activerecord-3.2.9/lib/rails/generators/active_record/migration.rb
challah-0.8.3 vendor/bundle/gems/activerecord-3.2.8/lib/rails/generators/active_record/migration.rb
challah-0.8.3 vendor/bundle/gems/activerecord-3.2.9/lib/rails/generators/active_record/migration.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/activerecord-3.1.1/lib/rails/generators/active_record/migration.rb
activerecord-3.2.9 lib/rails/generators/active_record/migration.rb
activerecord-3.2.9.rc3 lib/rails/generators/active_record/migration.rb