Skip to content

Commit

Permalink
Merge pull request rails#53029 from jgsheppa/52852_nulls_not_distinct…
Browse files Browse the repository at this point in the history
…_documentation

Add documentation for `nulls_not_distinct` option to `add_index` [ci skip]
  • Loading branch information
fatkodima authored Sep 24, 2024
2 parents fd975a8 + add6b17 commit 5ff57a5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,16 @@ def rename_column(table_name, column_name, new_column_name)
#
# 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')
Expand Down

0 comments on commit 5ff57a5

Please sign in to comment.