質問編集履歴

5

コードの記述もれ

2020/08/03 01:15

投稿

_tonton_
_tonton_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -32,6 +32,8 @@
32
32
 
33
33
  ## Database authenticatable
34
34
 
35
+ t.string :name,
36
+
35
37
  t.string :email, null: false, default: ""
36
38
 
37
39
  t.string :encrypted_password, null: false, default: ""
@@ -57,6 +59,8 @@
57
59
  end
58
60
 
59
61
 
62
+
63
+ add_index :users, :name
60
64
 
61
65
  add_index :users, :email, unique: true
62
66
 

4

コードの記述もれ

2020/08/03 01:15

投稿

_tonton_
_tonton_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -98,7 +98,7 @@
98
98
 
99
99
 
100
100
 
101
- -bin/rails db:migrate実行時
101
+ -bin/rails db:migrateおよびrails db:drop実行時
102
102
 
103
103
  ![イメージ説明](a2d3bfcb7378b6361601fd6a82a04557.jpeg)
104
104
 

3

コード追記

2020/08/03 00:10

投稿

_tonton_
_tonton_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -17,6 +17,74 @@
17
17
  ここからの復旧方法がわかりません。
18
18
 
19
19
 
20
+
21
+ ### 関連すると思われるマイグレーションファイル
22
+
23
+ - 20200802154808_devise_create_users.rb
24
+
25
+ ```ruby
26
+
27
+ class DeviseCreateUsers < ActiveRecord::Migration[6.0]
28
+
29
+ def change
30
+
31
+ create_table :users do |t|
32
+
33
+ ## Database authenticatable
34
+
35
+ t.string :email, null: false, default: ""
36
+
37
+ t.string :encrypted_password, null: false, default: ""
38
+
39
+
40
+
41
+ ## Recoverable
42
+
43
+ t.string :reset_password_token
44
+
45
+ t.datetime :reset_password_sent_at
46
+
47
+
48
+
49
+ ## Rememberable
50
+
51
+ t.datetime :remember_created_at
52
+
53
+
54
+
55
+ t.timestamps null: false
56
+
57
+ end
58
+
59
+
60
+
61
+ add_index :users, :email, unique: true
62
+
63
+ add_index :users, :reset_password_token, unique: true
64
+
65
+ end
66
+
67
+ end
68
+
69
+ ```
70
+
71
+ - 20200730140954_add_image_to_user.rb
72
+
73
+ ```ruby
74
+
75
+ class AddImageToUser < ActiveRecord::Migration[6.0]
76
+
77
+ def change
78
+
79
+ add_column :users, :image, :string
80
+
81
+ end
82
+
83
+ end
84
+
85
+
86
+
87
+ ```
20
88
 
21
89
  ### 試したこと
22
90
 

2

コード追記

2020/08/03 00:07

投稿

_tonton_
_tonton_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -30,6 +30,18 @@
30
30
 
31
31
 
32
32
 
33
+ -bin/rails db:migrate実行時
34
+
35
+ ![イメージ説明](a2d3bfcb7378b6361601fd6a82a04557.jpeg)
36
+
37
+
38
+
39
+ -rails db:migrate RAILS_ENV=development実行時
40
+
41
+ ![イメージ説明](92362af626905e37d15253c203cab455.jpeg)
42
+
43
+
44
+
33
45
  ### 補足情報(FW/ツールのバージョンなど)
34
46
 
35
47
  Rails、devise利用しています。

1

記載漏れ

2020/08/02 23:57

投稿

_tonton_
_tonton_

スコア4

test CHANGED
File without changes
test CHANGED
@@ -32,4 +32,4 @@
32
32
 
33
33
  ### 補足情報(FW/ツールのバージョンなど)
34
34
 
35
- devise利用しています。
35
+ Rails、devise利用しています。