From 212f925654f944067f18429ca02d902473214722 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 23 Jul 2017 21:19:34 +0200 Subject: Collapse indeces per Jeremy. --- lib/active_storage/migration.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/active_storage') 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 -- cgit v1.2.3