remove unique index
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RemoveActiveStorageUniqIndex < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
remove_index :active_storage_attachments, %i[record_type record_id name blob_id],
|
||||
unique: true,
|
||||
name: 'index_active_storage_attachments_uniqueness'
|
||||
|
||||
add_index :active_storage_attachments, %i[record_type record_id name blob_id]
|
||||
end
|
||||
end
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_08_16_075917) do
|
||||
ActiveRecord::Schema[7.1].define(version: 2024_08_16_121641) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -64,7 +64,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_08_16_075917) do
|
||||
t.bigint "blob_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "idx_on_record_type_record_id_name_blob_id_0be5805727"
|
||||
t.index ["uuid"], name: "index_active_storage_attachments_on_uuid"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user