From 992d95cb18700105fd4cc048bff3df86f1ac360e Mon Sep 17 00:00:00 2001 From: miteruzo Date: Wed, 10 Dec 2025 22:20:20 +0900 Subject: [PATCH] =?UTF-8?q?#84=20=E6=A7=8B=E6=96=87=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/models/tag.rb | 2 +- backend/db/schema.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/app/models/tag.rb b/backend/app/models/tag.rb index 4ed034c..d5880e1 100644 --- a/backend/app/models/tag.rb +++ b/backend/app/models/tag.rb @@ -1,6 +1,6 @@ class Tag < ApplicationRecord has_many :post_tags, dependent: :delete_all, inverse_of: :tag - has_many :active_post_tags, -> { kept }, class_name: 'PostTag', :inverse_of: :tag + has_many :active_post_tags, -> { kept }, class_name: 'PostTag', inverse_of: :tag has_many :post_tags_with_discarded, -> { with_discarded }, class_name: 'PostTag' has_many :posts, through: :active_post_tags has_many :tag_aliases, dependent: :destroy diff --git a/backend/db/schema.rb b/backend/db/schema.rb index f55b323..6a26dfd 100644 --- a/backend/db/schema.rb +++ b/backend/db/schema.rb @@ -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_10_11_200300) do +ActiveRecord::Schema[8.0].define(version: 2025_12_10_123200) do create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false @@ -40,7 +40,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_11_200300) do end create_table "ip_addresses", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| - t.binary "ip_adress", limit: 16, null: false + t.binary "ip_address", limit: 16, null: false t.boolean "banned", default: false, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -120,6 +120,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_11_200300) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["parent_tag_id"], name: "index_tag_implications_on_parent_tag_id" + t.index ["tag_id", "parent_tag_id"], name: "index_tag_implications_on_tag_id_and_parent_tag_id", unique: true t.index ["tag_id"], name: "index_tag_implications_on_tag_id" end