3,765
回編集
差分
→othersテーブルにインサートする
clients_old;
INSERT 0 4747</nowiki>
==== 2つのテーブルが同じならコピーされる ====
<nowiki>jq@MacBook-Pro tep5 % pg_dump --username=jq --table clients update_heroku > ../new_clients.sql
jq@MacBook-Pro tep5 % psql --username=jq tep5_development < ../new_clients.sql</nowiki>
<nowiki>jq@MacBook-Pro tep5 % pg_dump --username=jq --table others update_heroku > ../new_others.sql
jq@MacBook-Pro tep5 % psql --username=jq tep5_development < ../new_others.sql
SET
SET
SET
SET
SET
set_config
------------
(1 row)
SET
SET
SET
SET
SET
SET
ERROR: relation "others" already exists
ALTER TABLE
ERROR: relation "others_id_seq" already exists
ALTER TABLE
ALTER SEQUENCE
ALTER TABLE
COPY 4747
setval
--------
1
(1 row)
ERROR: multiple primary keys for table "others" are not allowed
ERROR: relation "index_others_on_client_id" already exists
ERROR: relation "index_others_on_client_id_and_other_line" already exists
ERROR: relation "index_others_on_note_id" already exists
ERROR: relation "index_others_on_user_id" already exists
ERROR: relation "index_others_on_user_id_and_note_id" already exists
ERROR: constraint "fk_rails_10377da6e2" for relation "others" already exists
ERROR: constraint "fk_rails_26cdbbd90e" for relation "others" already exists
ERROR: constraint "fk_rails_54f6a74f65" for relation "others" already exists</nowiki>
=== placesテーブル ===