「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 == | ||
152行目: | 147行目: | ||
=# 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 === | ||
198行目: | 190行目: | ||
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 | ||
− | clients_old; | + | clients_old;</nowiki> |
− | |||
=== insert エラー === | === insert エラー === | ||
212行目: | 203行目: | ||
% rails db:migrate:up VERSION= | % rails db:migrate:up VERSION= | ||
− | |||
− | |||
− | |||
=# delete from clients_old where id in (4028,3911,3912,2998,3007,4359); | =# delete from clients_old where id in (4028,3911,3912,2998,3007,4359); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 指定行を作る === | === 指定行を作る === | ||
278行目: | 222行目: | ||
; | ; | ||
UPDATE 3066</nowiki> | UPDATE 3066</nowiki> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== ローカル == | == ローカル == | ||
411行目: | 347行目: | ||
== 同期 == | == 同期 == | ||
− | + | % rsync -r ~/rails_app_tepnote/4tep/ host:/home/tep/ | |
除外するファイルをまとめる | 除外するファイルをまとめる | ||
<nowiki>exclude-file.txt | <nowiki>exclude-file.txt | ||
422行目: | 358行目: | ||
$ 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 | ||
− | |||
− | |||
− | |||
− | |||
エラーのとき | エラーのとき | ||
454行目: | 382行目: | ||
== 参考 == | == 参考 == | ||
− | <nowiki>=# delete from clients_old where | + | <nowiki>=# delete from clients_old where id in (977, |
22, | 22, | ||
23, | 23, | ||
461行目: | 389行目: | ||
27, | 27, | ||
30, | 30, | ||
− | + | 533, | |
− | + | 266, | |
34, | 34, | ||
35, | 35, | ||
469行目: | 397行目: | ||
41, | 41, | ||
43, | 43, | ||
− | + | 459, | |
45, | 45, | ||
− | + | 989, | |
48, | 48, | ||
49, | 49, | ||
477行目: | 405行目: | ||
52, | 52, | ||
53, | 53, | ||
− | + | 990, | |
− | + | 697, | |
62, | 62, | ||
− | + | 297, | |
64, | 64, | ||
66, | 66, | ||
486行目: | 414行目: | ||
68, | 68, | ||
69, | 69, | ||
− | + | 978, | |
− | + | 704, | |
− | + | 793, | |
79, | 79, | ||
80, | 80, | ||
501行目: | 429行目: | ||
97, | 97, | ||
98, | 98, | ||
− | + | 517, | |
100, | 100, | ||
− | + | 974, | |
− | + | 269, | |
104, | 104, | ||
− | + | 1793)</nowiki> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |