質問編集履歴
1
要望
test
CHANGED
File without changes
|
test
CHANGED
@@ -171,3 +171,139 @@
|
|
171
171
|
|
172
172
|
|
173
173
|
説明不足の点が多々あると思いますが、よろしくお願い致します。
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
### 追記 schema.rb
|
180
|
+
|
181
|
+
```ここに言語を入力
|
182
|
+
|
183
|
+
ActiveRecord::Schema.define(version: 2019_04_25_165918) do
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
create_table "active_storage_attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
188
|
+
|
189
|
+
t.string "name", null: false
|
190
|
+
|
191
|
+
t.string "record_type", null: false
|
192
|
+
|
193
|
+
t.bigint "record_id", null: false
|
194
|
+
|
195
|
+
t.bigint "blob_id", null: false
|
196
|
+
|
197
|
+
t.datetime "created_at", null: false
|
198
|
+
|
199
|
+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
200
|
+
|
201
|
+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
202
|
+
|
203
|
+
end
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
create_table "active_storage_blobs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
208
|
+
|
209
|
+
t.string "key", null: false
|
210
|
+
|
211
|
+
t.string "filename", null: false
|
212
|
+
|
213
|
+
t.string "content_type"
|
214
|
+
|
215
|
+
t.text "metadata"
|
216
|
+
|
217
|
+
t.bigint "byte_size", null: false
|
218
|
+
|
219
|
+
t.string "checksum", null: false
|
220
|
+
|
221
|
+
t.datetime "created_at", null: false
|
222
|
+
|
223
|
+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
224
|
+
|
225
|
+
end
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
create_table "accounts", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
230
|
+
|
231
|
+
t.string "email", default: "", null: false
|
232
|
+
|
233
|
+
t.string "encrypted_password", default: "", null: false
|
234
|
+
|
235
|
+
t.string "reset_password_token"
|
236
|
+
|
237
|
+
t.datetime "reset_password_sent_at"
|
238
|
+
|
239
|
+
t.datetime "remember_created_at"
|
240
|
+
|
241
|
+
t.string "confirmation_token"
|
242
|
+
|
243
|
+
t.datetime "confirmed_at"
|
244
|
+
|
245
|
+
t.datetime "confirmation_sent_at"
|
246
|
+
|
247
|
+
t.string "unconfirmed_email"
|
248
|
+
|
249
|
+
t.datetime "created_at", null: false
|
250
|
+
|
251
|
+
t.datetime "updated_at", null: false
|
252
|
+
|
253
|
+
t.string "name"
|
254
|
+
|
255
|
+
t.integer "postaclcode"
|
256
|
+
|
257
|
+
t.text "address"
|
258
|
+
|
259
|
+
t.string "handlename"
|
260
|
+
|
261
|
+
t.text "profile"
|
262
|
+
|
263
|
+
t.bigint "m_rank_id"
|
264
|
+
|
265
|
+
t.boolean "delflg"
|
266
|
+
|
267
|
+
t.index ["email"], name: "index_accounts_on_email", unique: true
|
268
|
+
|
269
|
+
t.index ["m_rank_id"], name: "index_accounts_on_m_rank_id"
|
270
|
+
|
271
|
+
t.index ["reset_password_token"], name: "index_accounts_on_reset_password_token", unique: true
|
272
|
+
|
273
|
+
end
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
create_table "comments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
|
278
|
+
|
279
|
+
t.bigint "work_id"
|
280
|
+
|
281
|
+
t.bigint "account_id"
|
282
|
+
|
283
|
+
t.text "comment"
|
284
|
+
|
285
|
+
t.boolean "delflg"
|
286
|
+
|
287
|
+
t.datetime "created_at", null: false
|
288
|
+
|
289
|
+
t.datetime "updated_at", null: false
|
290
|
+
|
291
|
+
t.index ["account_id"], name: "index_comments_on_account_id"
|
292
|
+
|
293
|
+
t.index ["work_id"], name: "index_comments_on_work_id"
|
294
|
+
|
295
|
+
end
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
302
|
+
|
303
|
+
add_foreign_key "comments", "accounts"
|
304
|
+
|
305
|
+
add_foreign_key "comments", "works"
|
306
|
+
|
307
|
+
end
|
308
|
+
|
309
|
+
```
|