このコミットが含まれているのは:
+11
@@ -0,0 +1,11 @@
|
||||
class AddForeignKeyOnPostIdAndTagIdInPostTagSections < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
remove_foreign_key :post_tag_sections, :posts, column: :post_id
|
||||
remove_foreign_key :post_tag_sections, :tags, column: :tag_id
|
||||
|
||||
add_foreign_key :post_tag_sections, :post_tags,
|
||||
column: [:post_id, :tag_id],
|
||||
primary_key: [:post_id, :tag_id],
|
||||
on_delete: :cascade
|
||||
end
|
||||
end
|
||||
生成ファイル
+2
-3
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_09_21_000000) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_09_21_010000) 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
|
||||
@@ -713,8 +713,7 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_000000) do
|
||||
add_foreign_key "post_implications", "posts", column: "parent_post_id"
|
||||
add_foreign_key "post_similarities", "posts"
|
||||
add_foreign_key "post_similarities", "posts", column: "target_post_id"
|
||||
add_foreign_key "post_tag_sections", "posts"
|
||||
add_foreign_key "post_tag_sections", "tags"
|
||||
add_foreign_key "post_tag_sections", "post_tags", column: ["post_id", "tag_id"], primary_key: ["post_id", "tag_id"], on_delete: :cascade
|
||||
add_foreign_key "post_tags", "posts"
|
||||
add_foreign_key "post_tags", "tags"
|
||||
add_foreign_key "post_tags", "users", column: "created_user_id"
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする