Browse Source

#84 構文エラー修正

feature/084
みてるぞ 3 days ago
parent
commit
992d95cb18
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      backend/app/models/tag.rb
  2. +3
    -2
      backend/db/schema.rb

+ 1
- 1
backend/app/models/tag.rb View File

@@ -1,6 +1,6 @@
class Tag < ApplicationRecord class Tag < ApplicationRecord
has_many :post_tags, dependent: :delete_all, inverse_of: :tag 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 :post_tags_with_discarded, -> { with_discarded }, class_name: 'PostTag'
has_many :posts, through: :active_post_tags has_many :posts, through: :active_post_tags
has_many :tag_aliases, dependent: :destroy has_many :tag_aliases, dependent: :destroy


+ 3
- 2
backend/db/schema.rb View File

@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # 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| create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "name", null: false t.string "name", null: false
t.string "record_type", null: false t.string "record_type", null: false
@@ -40,7 +40,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_11_200300) do
end end


create_table "ip_addresses", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| 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.boolean "banned", default: false, null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_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 "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.index ["parent_tag_id"], name: "index_tag_implications_on_parent_tag_id" 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" t.index ["tag_id"], name: "index_tag_implications_on_tag_id"
end end




Loading…
Cancel
Save