module ActiveRecord::ConnectionAdapters::ColumnMethods

def define_column_methods(*column_types) # :nodoc:

:nodoc:
def define_column_methods(*column_types) # :nodoc:
  column_types.each do |column_type|
    module_eval <<-RUBY, __FILE__, __LINE__ + 1
      def #{column_type}(*names, **options)
        raise ArgumentError, "Missing column name(s) for #{column_type}" if names.empty?
        names.each { |name| column(name, :#{column_type}, **options) }
      end
    RUBY
  end
end

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

Can be called multiple times, but this is probably not a good idea.
Appends a primary key definition to the table definition.
def primary_key(name, type = :primary_key, **options)
  column(name, type, **options.merge(primary_key: true))
end