差分

Tep3-onk

524 バイト追加, 2022年9月18日 (日) 13:56
db:rollback
% 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 List user:references note:references content:string line:integer
$ rails generate scaffold Post content:text user:references picture:string
$ rails db:migrate:up VERSION=20200504051127
 
% rails db:migrate:reset
== postgres ==
;
UPDATE 3066</nowiki>
 
=== 作業テーブル削除 ===
<nowiki>tep5_development=# drop table clients_old ;
DROP TABLE
tep5_development=# drop table jq_clients ;
DROP TABLE
tep5_development=# drop table users_old ;
DROP TABLE</nowiki>
== ローカル ==
== 同期 ==
% rsync -r ~/rails_app_tepnote/4tep/ host:/home/tep/
除外するファイルをまとめる
<nowiki>exclude-file.txt
$ bundle install --without test development
{{font color||yellow|database.yml username:などを確認する (2箇所)}} {{font color||yellow|migrationファイルがダブったときは削除}}  $ rails db:migrate:status RAILS_ENV=production
$ rails db:create RAILS_ENV=production
または
$ rails db:reset RAILS_ENV=production
または
$ rails db:drop RAILS_ENV=production
または
=# drop database mydb;
エラーのとき
5158,
6053)
DELETE 307</nowiki>