Skip to content

Commit 7533bcb

Browse files
authored
Merge pull request rails#50731 from javierav/create-table-doc
Document passing Hash as `:id` option to `create_table` [skip ci]
2 parents af7682e + 6f751f0 commit 7533bcb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ def primary_key(table_name)
187187
# Join tables for {ActiveRecord::Base.has_and_belongs_to_many}[rdoc-ref:Associations::ClassMethods#has_and_belongs_to_many] should set it to false.
188188
#
189189
# A Symbol can be used to specify the type of the generated primary key column.
190+
#
191+
# A Hash can be used to specify the generated primary key column creation options.
192+
# See {add_column}[rdoc-ref:ConnectionAdapters::SchemaStatements#add_column] for available options.
190193
# [<tt>:primary_key</tt>]
191194
# The name of the primary key, if one is to be added automatically.
192195
# Defaults to +id+. If <tt>:id</tt> is false, then this option is ignored.

0 commit comments

Comments
 (0)