Create schema in Heroku Postgresql DB
I am trying to create a schema in a heroku database. I tried to useheroku pg:psql --app app_name DATABASE < schema.sql
schema.sql:
CREATE SCHEMA schema_name AUTHORIZATION user_name;
But my program still says schema_name doesn't exist. Maybe I'm missing something
+3
Antonio
source
to share
1 answer
I found the problem! I used Windows console but the command heroku pg:psql --app app_name DATABASE < schema.sql
didn't work here. I used the MINGWN32 console and the following command: cat schema.sql | heroku pg:psql --app app_name
and it worked!
+3
Antonio
source
to share