質問編集履歴

1

schema.rbを追記

2020/07/19 06:22

投稿

railsganbaruman
railsganbaruman

スコア16

test CHANGED
File without changes
test CHANGED
@@ -186,4 +186,110 @@
186
186
 
187
187
  ```
188
188
 
189
+ schema.rb
190
+
191
+ ```
192
+
193
+ # This file is auto-generated from the current state of the database. Instead
194
+
195
+ # of editing this file, please use the migrations feature of Active Record to
196
+
197
+ # incrementally modify your database, and then regenerate this schema definition.
198
+
199
+ #
200
+
201
+ # This file is the source Rails uses to define your schema when running `rails
202
+
203
+ # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
204
+
205
+ # be faster and is potentially less error prone than running all of your
206
+
207
+ # migrations from scratch. Old migrations may fail to apply correctly if those
208
+
209
+ # migrations use external dependencies or application code.
210
+
211
+ #
212
+
213
+ # It's strongly recommended that you check this file into your version control system.
214
+
215
+
216
+
217
+ ActiveRecord::Schema.define(version: 2020_07_18_091312) do
218
+
219
+
220
+
221
+ create_table "comments", force: :cascade do |t|
222
+
223
+ t.text "content"
224
+
225
+ t.integer "user_id", null: false
226
+
227
+ t.integer "tweet_id", null: false
228
+
229
+ t.datetime "created_at", precision: 6, null: false
230
+
231
+ t.datetime "updated_at", precision: 6, null: false
232
+
233
+ t.index ["tweet_id"], name: "index_comments_on_tweet_id"
234
+
235
+ t.index ["user_id"], name: "index_comments_on_user_id"
236
+
237
+ end
238
+
239
+
240
+
241
+ create_table "tweets", force: :cascade do |t|
242
+
243
+ t.text "context"
244
+
245
+ t.datetime "created_at", precision: 6, null: false
246
+
247
+ t.datetime "updated_at", precision: 6, null: false
248
+
249
+ t.integer "user_id"
250
+
251
+ end
252
+
253
+
254
+
255
+ create_table "users", force: :cascade do |t|
256
+
257
+ t.string "email", default: "", null: false
258
+
259
+ t.string "encrypted_password", default: "", null: false
260
+
261
+ t.string "reset_password_token"
262
+
263
+ t.datetime "reset_password_sent_at"
264
+
265
+ t.datetime "remember_created_at"
266
+
267
+ t.datetime "created_at", precision: 6, null: false
268
+
269
+ t.datetime "updated_at", precision: 6, null: false
270
+
271
+ t.string "name"
272
+
273
+ t.text "introduction"
274
+
275
+ t.string "profile_image_id"
276
+
277
+ t.index ["email"], name: "index_users_on_email", unique: true
278
+
279
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
280
+
281
+ end
282
+
283
+
284
+
285
+ add_foreign_key "comments", "tweets"
286
+
287
+ add_foreign_key "comments", "users"
288
+
289
+ end
290
+
291
+
292
+
293
+ ```
294
+
189
295
  検討に必要なファイルがありましたらコメントください。