Rework FEP-7888 implementation (#36064)

This commit is contained in:
Claire
2025-09-09 20:27:30 +02:00
committed by GitHub
parent 377e870348
commit e1dc960219
9 changed files with 61 additions and 25 deletions

View File

@@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddIndexOnParentStatusIdToConversations < ActiveRecord::Migration[8.0]
disable_ddl_transaction!
def change
add_index :conversations, :parent_status_id, algorithm: :concurrently, unique: true, where: 'parent_status_id IS NOT NULL'
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_09_02_221600) do
ActiveRecord::Schema[8.0].define(version: 2025_09_09_100506) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@@ -361,6 +361,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_02_221600) do
t.datetime "updated_at", precision: nil, null: false
t.bigint "parent_status_id"
t.bigint "parent_account_id"
t.index ["parent_status_id"], name: "index_conversations_on_parent_status_id", unique: true, where: "(parent_status_id IS NOT NULL)"
t.index ["uri"], name: "index_conversations_on_uri", unique: true, opclass: :text_pattern_ops, where: "(uri IS NOT NULL)"
end