How does one migrate their Django .sql3 development database to heroku?
Per here, and here I tried: heroku pg:psql --app sblic < database.sql3
but my Django admin shows no new uploads (even after syncdb/migrate/ or collectstatic
How does one migrate their Django .sql3 development database to heroku?
Per here, and here I tried: heroku pg:psql --app sblic < database.sql3
but my Django admin shows no new uploads (even after syncdb/migrate/ or collectstatic
Heroku command line tool uses the psql
binary. You have to install PostgreSQL on your local development machine to have psql available. From the (documentation)[https://devcenter.heroku.com/articles/heroku-postgresql#pg-psql]:
You must have PostgreSQL installed on your system to use heroku pg:psql.
You can in fact keep using your SQLite database with Heroku, but this is not recommended as it will be rewritten with your local copy if you re-deploy it to another dyno. Migrating the data to psql is recommended as described at https://devcenter.heroku.com/articles/sqlite3
Perhaps there may be a way to directly upload an sql3 file to Heroku, but I went with the path of clearest certainty (convert local sql3 db to postgre db and upload a dump of postgre db to Heroku via pgbackups tool):
bin
directory in the Path
environment variable, create a postgre user and database (or just plan on using your initial super user account created upon installing postgresql)settings.py
with a reference to your newly created postgre database (note, 'HOST'
may need to be set as 'localhost'
, 'user'
is your postgre user login)python manage.py syncdb
to initiate your new postgre db