質問編集履歴
4
質問の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -94,13 +94,13 @@
|
|
94
94
|
create_table :users do |t|
|
95
95
|
## Database authenticatable
|
96
96
|
t.string :name, null: false
|
97
|
-
--------ここに追加------------------------------------
|
97
|
+
--------ここに追加したい------------------------------------
|
98
98
|
t.string :telephone_number
|
99
99
|
t.string :furiganaName
|
100
100
|
t.string :address
|
101
101
|
t.string :self_inroduction
|
102
102
|
t.string :image
|
103
|
-
--------ここに追加------------------------------------
|
103
|
+
--------ここに追加したい------------------------------------
|
104
104
|
t.string :email, null: false, default: ""
|
105
105
|
t.string :encrypted_password, null: false, default: ""
|
106
106
|
|
3
質問の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -86,6 +86,7 @@
|
|
86
86
|
|
87
87
|
!追加
|
88
88
|
追加しようとしたコード(まだ実行していません)
|
89
|
+
```
|
89
90
|
# frozen_string_literal: true
|
90
91
|
|
91
92
|
class DeviseCreateUsers < ActiveRecord::Migration[6.1]
|
@@ -138,4 +139,6 @@
|
|
138
139
|
# add_index :users, :unlock_token, unique: true
|
139
140
|
end
|
140
141
|
end
|
142
|
+
```
|
141
143
|
|
144
|
+
|
2
行おうとした具体的なコード例
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,3 +84,58 @@
|
|
84
84
|
参考サイト:
|
85
85
|
https://qiita.com/masayan-06/items/61b9d2be6ee3f67315f0
|
86
86
|
|
87
|
+
!追加
|
88
|
+
追加しようとしたコード(まだ実行していません)
|
89
|
+
# frozen_string_literal: true
|
90
|
+
|
91
|
+
class DeviseCreateUsers < ActiveRecord::Migration[6.1]
|
92
|
+
def change
|
93
|
+
create_table :users do |t|
|
94
|
+
## Database authenticatable
|
95
|
+
t.string :name, null: false
|
96
|
+
--------ここに追加------------------------------------
|
97
|
+
t.string :telephone_number
|
98
|
+
t.string :furiganaName
|
99
|
+
t.string :address
|
100
|
+
t.string :self_inroduction
|
101
|
+
t.string :image
|
102
|
+
--------ここに追加------------------------------------
|
103
|
+
t.string :email, null: false, default: ""
|
104
|
+
t.string :encrypted_password, null: false, default: ""
|
105
|
+
|
106
|
+
## Recoverable
|
107
|
+
t.string :reset_password_token
|
108
|
+
t.datetime :reset_password_sent_at
|
109
|
+
|
110
|
+
## Rememberable
|
111
|
+
t.datetime :remember_created_at
|
112
|
+
|
113
|
+
## Trackable
|
114
|
+
# t.integer :sign_in_count, default: 0, null: false
|
115
|
+
# t.datetime :current_sign_in_at
|
116
|
+
# t.datetime :last_sign_in_at
|
117
|
+
# t.string :current_sign_in_ip
|
118
|
+
# t.string :last_sign_in_ip
|
119
|
+
|
120
|
+
## Confirmable
|
121
|
+
# t.string :confirmation_token
|
122
|
+
# t.datetime :confirmed_at
|
123
|
+
# t.datetime :confirmation_sent_at
|
124
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
125
|
+
|
126
|
+
## Lockable
|
127
|
+
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
|
128
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
129
|
+
# t.datetime :locked_at
|
130
|
+
|
131
|
+
|
132
|
+
t.timestamps null: false
|
133
|
+
end
|
134
|
+
|
135
|
+
add_index :users, :email, unique: true
|
136
|
+
add_index :users, :reset_password_token, unique: true
|
137
|
+
# add_index :users, :confirmation_token, unique: true
|
138
|
+
# add_index :users, :unlock_token, unique: true
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
1
分かりやすい質問タイトルに変えた
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
deviseを使ったuser作成
|
1
|
+
deviseを使ったuserの作成について
|
test
CHANGED
File without changes
|