Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ユーザー認証機能の実装に向けて、
usersテーブルおよびUserモデルの初期整備を行いました。今後 JWT 認証などを実装するための土台となる変更です。
refs #44
変更内容
bcryptを追加し、パスワードハッシュ化の準備を実施usersテーブルに以下のカラムを追加email(一意制約あり)password_digestrolenull: false/ unique index)を設定Userモデルでhas_secure_passwordを有効化変更の背景・意図
仕様変更が出た場合は Model 側で調整できる構成としています
後続実装時のマイグレーション事故を防ぐ狙いです
確認事項
rails db:migrateが正常に完了することrails cからUser.create!でユーザー作成できることhas_secure_passwordによりpassword_digestが自動生成されること備考