mirror of https://github.com/rails/rails
Merge pull request #53029 from jgsheppa/52852_nulls_not_distinct_documentation
Add documentation for `nulls_not_distinct` option to `add_index` [ci skip]
This commit is contained in:
commit
5ff57a5e90
|
@ -855,6 +855,16 @@ module ActiveRecord
|
|||
#
|
||||
# Note: only supported by PostgreSQL.
|
||||
#
|
||||
# ====== Creating an index where NULLs are treated equally
|
||||
#
|
||||
# add_index(:people, :last_name, nulls_not_distinct: true)
|
||||
#
|
||||
# generates:
|
||||
#
|
||||
# CREATE INDEX index_people_on_last_name ON people (last_name) NULLS NOT DISTINCT
|
||||
#
|
||||
# Note: only supported by PostgreSQL version 15.0.0 and greater.
|
||||
#
|
||||
# ====== Creating an index with a specific method
|
||||
#
|
||||
# add_index(:developers, :name, using: 'btree')
|
||||
|
|
Loading…
Reference in New Issue