diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-23 21:19:34 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-07-23 21:19:34 +0200 |
commit | 212f925654f944067f18429ca02d902473214722 (patch) | |
tree | 3c5e046b3ba52e6ac001ebded66f7dd8b7d6e4e6 | |
parent | 5963766d840ddcdb577a1bd10eb1491a4ef9132f (diff) | |
download | rails-212f925654f944067f18429ca02d902473214722.tar.gz rails-212f925654f944067f18429ca02d902473214722.tar.bz2 rails-212f925654f944067f18429ca02d902473214722.zip |
Collapse indeces per Jeremy.
-rw-r--r-- | lib/active_storage/migration.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/active_storage/migration.rb b/lib/active_storage/migration.rb index 99d8b8554b..e843c1b630 100644 --- a/lib/active_storage/migration.rb +++ b/lib/active_storage/migration.rb @@ -21,9 +21,7 @@ class ActiveStorageCreateTables < ActiveRecord::Migration[5.1] # :nodoc: t.datetime :created_at t.index :blob_id - t.index [ :record_type, :record_id ] - t.index [ :record_type, :record_id, :name ], name: "index_active_storage_attachments_record_and_name" - t.index [ :record_type, :record_id, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true + t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true end end end |