差分

移動先: 案内検索

Tep3-onk-2

582 バイト追加, 2022年9月28日 (水) 04:32
仕訳帳テーブル
UPDATE 719</nowiki>
client_idが無いデータの確認リストア コピー <nowiki>jq@MacBook-Pro tep5 % pg_dump --username=jq --table journals update_heroku> ../new_journals.sqljq@MacBook-Pro tep5 % psql --username=# select count(*) from journals where client_id is null;jq tep5_development < ../new_journals.sql SETSETSETSETSET count set_config ------------ 9806 (1 row)</nowiki>
替え玉のidでjournalsのclient_id null を埋めるSETSETSETSETSETSETERROR: relation "journals" already existsALTER TABLEERROR: relation "journals_id_seq" already existsALTER TABLEALTER SEQUENCEALTER TABLECOPY 14709 setval -------- 15023(1 row) ERROR: multiple primary keys for table "journals" are not allowedCREATE INDEXCREATE INDEXCREATE INDEXCREATE INDEXCREATE INDEXCREATE INDEXCREATE INDEXERROR: relation "index_journals_on_user_id" already existsCREATE INDEXERROR: relation "public.jiins" does not existALTER TABLE</nowiki>

案内メニュー