an import for testing puprposes on a local machine via
pg_restore -c -d db_name -Fc backup_file
is returning the following.
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3398; 2606 29392 FK CONSTRAINT chains fk_rails_998a00e446 deploy
pg_restore: error: could not execute query: ERROR: constraint "fk_rails_998a00e446" of relation "chains" does not exist
Command was: ALTER TABLE ONLY public.chains DROP CONSTRAINT fk_rails_998a00e446;
pg_restore: from TOC entry 3435; 2606 29222 FK CONSTRAINT shops fk_rails_24e1b904b4 deploy
pg_restore: error: could not execute query: ERROR: constraint "fk_rails_24e1b904b4" of relation "shops" does not exist
Command was: ALTER TABLE ONLY public.shops DROP CONSTRAINT fk_rails_24e1b904b4;
pg_restore: from TOC entry 3188; 1259 29056 INDEX index_chains_on_site_id deploy
pg_restore: error: could not execute query: ERROR: index "index_chains_on_site_id" does not exist
Command was: DROP INDEX public.index_chains_on_site_id;
pg_restore: warning: errors ignored on restore: 3
the migration files from rails for both classes do have:
t.bigint :site_id, index: true, default: 1
and checking the database does show that both classes have the indicies mentioned in the warnings
Foreign-key constraints:
"fk_rails_998a00e446" FOREIGN KEY (site_id) REFERENCES sites(id)
Foreign-key constraints:
"fk_rails_24e1b904b4" FOREIGN KEY (site_id) REFERENCES sites(id)
Thus the warning messages are unclear in terms of how they were generated, as well as their relative consequence.