method

primary_key

rails latest stable - Class: ActiveRecord::ConnectionAdapters::TableDefinition

Method deprecated or moved

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

primary_key(name, type = :primary_key, options = {})
public

Appends a primary key definition to the table definition. Can be called multiple times, but this is probably not a good idea.