Sha256: f2f87856e5aae890be19f8dc27c4c5a7b20bb2e9b885f95a01f5d941f023a27d

Contents?: true

Size: 674 Bytes

Versions: 24

Compression:

Stored size: 674 Bytes

Contents

require 'rails/generators/migration'

module ActiveRecord
  module Generators # :nodoc:
    module Migration
      extend ActiveSupport::Concern
      include Rails::Generators::Migration

      module ClassMethods
        # Implement the required interface for Rails::Generators::Migration.
        def next_migration_number(dirname)
          next_migration_number = current_migration_number(dirname) + 1
          ActiveRecord::Migration.next_migration_number(next_migration_number)
        end
      end

      private

        def primary_key_type
          key_type = options[:primary_key_type]
          ", id: :#{key_type}" if key_type
        end
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activerecord-5.0.2/lib/rails/generators/active_record/migration.rb
activerecord-5.0.2 lib/rails/generators/active_record/migration.rb
activerecord-5.0.2.rc1 lib/rails/generators/active_record/migration.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/rails/generators/active_record/migration.rb
abaci-0.3.0 vendor/bundle/gems/activerecord-5.0.0/lib/rails/generators/active_record/migration.rb
activerecord-5.0.1 lib/rails/generators/active_record/migration.rb
activerecord-5.0.1.rc2 lib/rails/generators/active_record/migration.rb
activerecord-5.0.1.rc1 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0.1 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0.rc2 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0.racecar1 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0.rc1 lib/rails/generators/active_record/migration.rb
activerecord-5.0.0.beta4 lib/rails/generators/active_record/migration.rb