I want to load schema from structure.sql file to my Heroku database. On my localhost machine I do as follows and all works just fine, all tables are created:
C:\> psql -U postgres -a -d MyApp_development -f C:\MyApp\db\structure.sql
I pass a local file name as -f
option: -f C:\MyApp\db\structure.sql
When I do the same on Heroku, it complains that the app is not found. I think that it doesn't understand -f
option. It cannot find file C:\MyApp\db\structure.sql
on its server.
So how do I need to provide correct path relative to Heroku? structure.sql has to be located here on Heroku:
MyApp\db\structure.sql
So I need to do something like this:
heroku pg:psql -U ... -a -d MyHerokuDB -f MyHerokuAppRoot\db\structure.sql
What is MyHerokuAppRoot
? What with may substitute it?