「Tep3-onk」を編集中
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
[[category:memo|{{PAGENAME}}]] | [[category:memo|{{PAGENAME}}]] | ||
− | |||
== generate == | == generate == | ||
12行目: | 11行目: | ||
% rails generate scaffold Other user:references note:references client:references name:string yomi:string client_name:boolean line:integer memo:text generation:string | % rails generate scaffold Other user:references note:references client:references name:string yomi:string client_name:boolean line:integer memo:text generation:string | ||
− | |||
− | |||
$ rails generate scaffold Post content:text user:references picture:string | $ rails generate scaffold Post content:text user:references picture:string | ||
41行目: | 38行目: | ||
$ rails db:migrate:up VERSION=20200504051127 | $ rails db:migrate:up VERSION=20200504051127 | ||
− | |||
− | |||
== postgres == | == postgres == | ||
80行目: | 75行目: | ||
COPY 3066</nowiki> | COPY 3066</nowiki> | ||
− | === | + | === table dump === |
ALTER TABLE users RENAME TO users_old; | ALTER TABLE users RENAME TO users_old; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | % pg_dump --username=jq --table | + | % pg_dump --username=jq --table jq_clients heroku_dump > old_other.sql |
− | <nowiki>% psql --username=jq tep5_development < | + | <nowiki>% psql --username=jq tep5_development < old_other.sql |
SET | SET | ||
SET | SET | ||
109行目: | 97行目: | ||
SET | SET | ||
SET | SET | ||
− | + | CREATE TABLE | |
ALTER TABLE | ALTER TABLE | ||
− | + | COPY 3066 | |
− | + | </nowiki> | |
− | |||
− | |||
− | COPY | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== ie_id 重複修正 === | === ie_id 重複修正 === | ||
143行目: | 116行目: | ||
2167 | 2 | 2167 | 2 | ||
</nowiki> | </nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
=# select * from clients_old where ie_id = 2090; | =# select * from clients_old where ie_id = 2090; | ||
=# update clients_old set ie_id = 6000 where ie_id = 2090 and jiin_id > 1; | =# update clients_old set ie_id = 6000 where ie_id = 2090 and jiin_id > 1; | ||
− | |||
− | |||
− | |||
=== insert === | === insert === | ||
188行目: | 153行目: | ||
where | where | ||
nusi = true; | nusi = true; | ||
− | |||
</nowiki> | </nowiki> | ||
198行目: | 162行目: | ||
id, name, yomi, ie_id, nusi, user_id, jiin_id, created_at, updated_at, memo, each_order, generation | id, name, yomi, ie_id, nusi, user_id, jiin_id, created_at, updated_at, memo, each_order, generation | ||
from | from | ||
− | + | jq_clients;</nowiki> | |
− | |||
=== insert エラー === | === insert エラー === | ||
211行目: | 174行目: | ||
% rails db:migrate:up VERSION= | % rails db:migrate:up VERSION= | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 指定行を作る === | === 指定行を作る === | ||
278行目: | 192行目: | ||
; | ; | ||
UPDATE 3066</nowiki> | UPDATE 3066</nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== ローカル == | == ローカル == | ||
411行目: | 317行目: | ||
== 同期 == | == 同期 == | ||
− | + | % rsync -r ~/rails_app_tepnote/4tep/ host:/home/tep/ | |
除外するファイルをまとめる | 除外するファイルをまとめる | ||
<nowiki>exclude-file.txt | <nowiki>exclude-file.txt | ||
422行目: | 328行目: | ||
$ bundle install --without test development | $ bundle install --without test development | ||
− | + | database.yml username:などを確認する (2箇所) | |
− | |||
− | |||
− | |||
− | |||
$ rails db:create RAILS_ENV=production | $ rails db:create RAILS_ENV=production | ||
または | または | ||
$ rails db:reset RAILS_ENV=production | $ rails db:reset RAILS_ENV=production | ||
− | |||
− | |||
− | |||
− | |||
エラーのとき | エラーのとき | ||
452行目: | 350行目: | ||
daisyuiをインストール | daisyuiをインストール | ||
$ yarn add daisyui | $ yarn add daisyui | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |