method

primary_key

rails latest stable - Class: ActiveRecord::ConnectionAdapters::MySQL::ColumnMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

primary_key(name, type = :primary_key, **options)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb, line 5
        def primary_key(name, type = :primary_key, **options)
          options[:auto_increment] = true if [:integer, :bigint].include?(type) && !options.key?(:default)
          super
        end