I have a .sql file with a bunch of insert commands that I want to execute on my postgres database on heroku. But I don't know how to do it:-
If I had access to postgres console I'd type the following:
psql -h localhost -d database -U username -f datafile.sql
but it seems that heroku doesn't support this command. I've tried with
heroku pg:psql
but that doesn't let me input a file.
Are there any other options?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…