Heroku
提供: wikipokpok
heroku pg:psql -c "\d clients"
heroku pg:psql -c "select * from clients_id_seq"
idで名前と戒名を紐付ける
heroku pg:psql -c "\copy clients (id,name,yomi,ie_id,nusi,user_id,jiin_id,created_at,updated_at,ie_id_v) from '/home/shudo/an_meibo.csv' with csv"
heroku pg:psql -c "\copy kaimyous (content,user_id,jiin_id,client_id,created_at,updated_at,date,ie_id,g_age,relationship,ie_id_v) from '/home/shudo/an_kaimyou.csv' with csv"
scheduleのデータ移行 新しいie_id,client_idは空 履歴に出てこない
heroku pg:psql -c "\copy schedules (datetime,content,jiin_id,user_id,created_at,updated_at,ie_id,client_id,ie_id_v) from '/home/shudo/an_yotei.csv' with csv"
journalデータ移行準備
SELECT * FROM `siwakemeisai` JOIN siwake ON siwakemeisai.`dennpyouBanngou` = siwake.id