From e91c4339e4d8967f3d8e9eaf1f82bbc113bc69c1 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Mon, 13 Apr 2015 01:32:51 +0200 Subject: Document that partial indexes are only supported by Postgres and SQLite. Fixes #18106 --- activerecord/CHANGELOG.md | 6 ++++++ .../active_record/connection_adapters/abstract/schema_statements.rb | 2 ++ 2 files changed, 8 insertions(+) diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 904ac5c26a..1af9a57e4f 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,9 @@ +* Add note that partial indexes are only supported by Postgres and SQLite. + + Fixes #18106 + + *Grey Baker* + * Fixed a bug where uniqueness validations would error on out of range values, even if an validation should have prevented it from hitting the database. diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 466b076571..ecb4868c13 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -537,6 +537,8 @@ module ActiveRecord # # CREATE UNIQUE INDEX index_accounts_on_branch_id_and_party_id ON accounts(branch_id, party_id) WHERE active # + # Note: Partial indexes are only supported for PostgreSQL and SQLite 3.8.0+. + # # ====== Creating an index with a specific method # # add_index(:developers, :name, using: 'btree') -- cgit v1.2.3