コメント機能のエラーが解決できない

schema

1ActiveRecord::Schema.define(version: 2024_01_17_114724) do 2 3 create_table "active_storage_attachments", force: :cascade do |t| 4 t.string "name", null: false 5 t.string "record_type", null: false 6 t.bigint "record_id", null: false 7 t.bigint "blob_id", null: false 8 t.datetime "created_at", null: false 9 t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" 10 t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true 11 end 12 13 create_table "active_storage_blobs", force: :cascade do |t| 14 t.string "key", null: false 15 t.string "filename", null: false 16 t.string "content_type" 17 t.text "metadata" 18 t.string "service_name", null: false 19 t.bigint "byte_size", null: false 20 t.string "checksum", null: false 21 t.datetime "created_at", null: false 22 t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true 23 end 24 25 create_table "active_storage_variant_records", force: :cascade do |t| 26 t.bigint "blob_id", null: false 27 t.string "variation_digest", null: false 28 t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true 29 end 30 31 create_table "admins", force: :cascade do |t| 32 t.string "email", default: "", null: false 33 t.string "encrypted_password", default: "", null: false 34 t.string "reset_password_token" 35 t.datetime "reset_password_sent_at" 36 t.datetime "remember_created_at" 37 t.datetime "created_at", precision: 6, null: false 38 t.datetime "updated_at", precision: 6, null: false 39 t.index ["email"], name: "index_admins_on_email", unique: true 40 t.index ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true 41 end 42 43 create_table "books", force: :cascade do |t| 44 t.string "star" 45 t.datetime "created_at", precision: 6, null: false 46 t.datetime "updated_at", precision: 6, null: false 47 end 48 49 create_table "post_comments", force: :cascade do |t| 50 t.text "comment" 51 t.integer "user_id" 52 t.datetime "created_at", precision: 6, null: false 53 t.datetime "updated_at", precision: 6, null: false 54 t.integer "post_image_id" 55 t.integer "post_id" 56 end 57 58 create_table "post_images", force: :cascade do |t| 59 t.datetime "created_at", precision: 6, null: false 60 t.datetime "updated_at", precision: 6, null: false 61 end 62 63 create_table "post_tag_relations", force: :cascade do |t| 64 t.integer "post_id", null: false 65 t.integer "tag_id", null: false 66 t.datetime "created_at", precision: 6, null: false 67 t.datetime "updated_at", precision: 6, null: false 68 t.index ["post_id"], name: "index_post_tag_relations_on_post_id" 69 t.index ["tag_id"], name: "index_post_tag_relations_on_tag_id" 70 end 71 72 create_table "posts", force: :cascade do |t| 73 t.string "book_title" 74 t.text "caption" 75 t.integer "user_id" 76 t.datetime "created_at", precision: 6, null: false 77 t.datetime "updated_at", precision: 6, null: false 78 t.string "star" 79 end 80 81 create_table "relationships", force: :cascade do |t| 82 t.integer "follower_id" 83 t.integer "followed_id" 84 t.datetime "created_at", precision: 6, null: false 85 t.datetime "updated_at", precision: 6, null: false 86 end 87 88 create_table "reviews", force: :cascade do |t| 89 t.string "star" 90 t.string "review_star" 91 t.datetime "created_at", precision: 6, null: false 92 t.datetime "updated_at", precision: 6, null: false 93 t.integer "post_id" 94 end 95 96 create_table "tags", force: :cascade do |t| 97 t.string "name" 98 t.datetime "created_at", precision: 6, null: false 99 t.datetime "updated_at", precision: 6, null: false 100 end 101 102 create_table "users", force: :cascade do |t| 103 t.string "email", default: "", null: false 104 t.string "encrypted_password", default: "", null: false 105 t.string "reset_password_token" 106 t.datetime "reset_password_sent_at" 107 t.datetime "remember_created_at" 108 t.string "name", null: false 109 t.datetime "created_at", precision: 6, null: false 110 t.datetime "updated_at", precision: 6, null: false 111 t.integer "failed_attemps", default: 0, null: false 112 t.string "unlock_token" 113 t.datetime "locked_at" 114 t.string "profile_image" 115 t.index ["email"], name: "index_users_on_email", unique: true 116 t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true 117 t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true 118 end 119 120 add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" 121 add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" 122 add_foreign_key "post_tag_relations", "posts" 123 add_foreign_key "post_tag_relations", "tags" 124end 125

コメントを投稿

0 コメント