Indexing a polymorphic assoc adds index on type and id [ci skip]
This commit is contained in:
parent
edbcdb95ff
commit
683ad0b471
|
@ -460,7 +460,7 @@ class CreatePictures < ActiveRecord::Migration
|
|||
t.timestamps null: false
|
||||
end
|
||||
|
||||
add_index :pictures, :imageable_id
|
||||
add_index :pictures, [:imageable_id, :imageable_type]
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue