rails migration partial index's where not working as expected

969 views Asked by At

i have a rails migration script:

add_index :site_tracking_codes, [:site_id, :is_published], where: "is_published IS TRUE", unique: true

but it generates the index like so:

CREATE UNIQUE INDEX index_site_tracking_codes_on_site_id_and_is_published ON public.site_tracking_codes USING btree (site_id, is_published);

without the where condition. rails version: ~> 4.2.11. postgreSQL 9.6 DB

0

There are 0 answers