s19013 / laravel-stations

Railway Laravel編のテンプレートリポジトリ
0 stars 0 forks source link

ユーザーデータの移行 #14

Closed s19013 closed 1 year ago

s19013 commented 1 year ago

初期パスはランダムに生成してもらう ->ランダムだとハッシュ化されたあと値がわからなくなりユーザーにパスワードをつたえることができなくなるので ->危ないがこちらで統一させてもらう ->ユーザー側で変更してもらおう

konamiのpaseriで会員登録せずにpaseriチャージをしたら自動的にアカウントを発行されたことあったし。いける!

s19013 commented 1 year ago
reservationテーブルを[名前,メアド]の2つでgroupで絞る //イメージ表 name email
aaa abcd@gmail.com
bbb qwer@gmail.com

同じ名前とメアドがない場合 これらをusersテーブルに登録していく

s19013 commented 1 year ago

reservationsテーブルを編集する

カラム名
user_id unsignedBigInt references('id')->on('user')->cascadeOnDelete()
s19013 commented 1 year ago

またreservationテーブルを[名前,メアド]とusesテーブルと見比べてreservationテーブルのuser_idusersテーブルのidを入れる

s19013 commented 1 year ago

すべて入れたらreservationsテーブルのnameemailを消す

s19013 commented 1 year ago

admin/reservation/index.balde.phpを修正する

s19013 commented 1 year ago

reservationモデルとuserモデルにリレーション追加